Walkover-Web-Solution / Giddh-New-Angular4-App

New web and electron app on Angular4
MIT License
2 stars 7 forks source link

Sales Module (Entry Date Issue) #887

Closed sagarnankani closed 6 years ago

sagarnankani commented 6 years ago

When a user creates entries from Sales module, entries are being created with incorrect date (current date), instead of the date provided by user.

This is because date provided by user is being sent in "date" key in request body, instead of "entryDate".

Note: For multiple entries, please send multiple objects in "entries" array.

ENV: PROD

Please fix this ASAP.

//API Details: Request URL: http://apitest.giddh.com/company/newsncindore15000172022770ygv88/accounts/cash/vouchers/generate Request Method: POST Status Code: 201 Created Request: {"voucher":{"accountDetails":{"country":{"countryName":"India"},"billingDetails":{"address":[],"stateCode":"01"},"shippingDetails":{"address":[]},"attentionTo":null,"email":null,"mobileNo":null,"uniqueName":"cash"},"entries":[{"transactions":[{"stockList":[],"applicableTaxes":[],"taxRenderData":[],"amount":2323,"total":2323,"isStockTxn":false,"hsnOrSac":"sac","date":"01-05-2018","taxableValue":2323,"fakeAccForSelect2":"594096b6-3cc0-4d03-8cbe-6da490956517","quantity":null,"accountName":"Sales","accountUniqueName":"sales","stockUnit":null,"stockDetails":null,"rate":null,"sacNumber":null,"hsnNumber":null}],"taxes":[],"taxList":[],"discounts":[{"amount":0,"accountName":"sa","accountUniqueName":"salu0"},{"amount":0,"accountName":"disc","accountUniqueName":"disc"},{"amount":0,"accountName":"newdisc","accountUniqueName":"newdisc"},{"amount":0,"accountName":"opq","accountUniqueName":"opqdvq"}],"taxSum":0,"discountSum":0,"voucherType":"Sales"}],"voucherDetails":{"customerName":"sERT","grandTotal":2323,"subTotal":2323,"totalAsWords":null,"voucherDate":"02-05-2018","dueDate":"22-05-2018","totalDiscount":0,"totalTaxableValue":2323,"gstTaxesTotal":0,"balanceDue":2323},"templateDetails":{"other":{"shippingDate":"","shippedVia":null,"trackingNumber":null,"customField1":null,"customField2":null,"customField3":null,"message2":null}}},"updateAccountDetails":false} Response: {"status":"success","body":{"voucherDetails":{"voucherNumber":"17","voucherDate":"02-05-2018","dueDate":"22-05-2018","balance":0,"balanceStatus":"PAID","totalAsWords":"Two Thousand Three Hundred Twenty Three Only","grandTotal":2323.00,"subTotal":2323.00,"totalDiscount":null,"taxesTotal":[],"customerName":"sERT"},"companyDetails":{"name":"New SN Corp","gstNumber":"232323232323232","address":["","hyderabad","telangana","India","452010","some@gmail.com","9199773812"],"stateCode":"23","panNumber":"CPGPS1791L"},"accountDetails":{"name":"cash","uniqueName":"mergecash","address":["test is my new address"],"attentionTo":"Mr. ABCD","email":"akshay@walkover.in","mobileNumber":"91-9876543210","billingDetails":{"gstNumber":null,"address":[],"stateCode":"01","stateName":"Jammu and Kashmir","panNumber":null},"shippingDetails":{"gstNumber":null,"address":[],"stateCode":"01","stateName":"Jammu and Kashmir","panNumber":null}},"templateDetails":{"logoPath":"http://apitest.giddh.com/company/newsncindore15000172022770ygv88/image/1524227360206vtxzf7b7c7","other":{"message1":"","message2":null,"shippingDate":"","shippedVia":null,"trackingNumber":null,"customField1":null,"customField2":null,"customField3":null,"slogan":""},"templateUniqueName":"gst_template_c"},"entries":[{"uniqueName":"zfr1526970600551","discounts":[],"taxes":[],"transactions":[{"accountName":"Sales","accountUniqueName":"sales","type":"DEBIT","amount":2323.00,"hsnNumber":null,"sacNumber":null,"description":"","quantity":null,"stockUnit":"","category":"income","taxableValue":2323.00,"date":null,"isStockTxn":null,"stockDetails":{"name":null,"uniqueName":null},"rate":null}],"description":"","taxableValue":2323.00,"discountTotal":0,"nonTaxableValue":0,"entryDate":"22-05-2018","taxList":[],"voucherType":"sales","entryTotal":2323.00}]}}

mustafa-walkover commented 6 years ago

done, please check