createOrders up

This commit is contained in:
joshikannan
2024-01-24 09:49:20 +05:30
parent bea9164791
commit 72d6c9f020
2 changed files with 1180 additions and 1287 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -997,8 +997,7 @@ const Createorder1 = () => {
arr = [ arr = [
{ {
orderheaderid: 0, orderheaderid: 0,
tenantid: tenantid, tenantid: parseFloat(tid),
// "locationid": tenant.locationid,
locationid: clientinfo.tenantlocationid ? clientinfo.tenantlocationid : tenantinfo.tenantlocationid, locationid: clientinfo.tenantlocationid ? clientinfo.tenantlocationid : tenantinfo.tenantlocationid,
moduleid: tenant.moduleid, moduleid: tenant.moduleid,
configid: 7, configid: 7,
@@ -1011,11 +1010,6 @@ const Createorder1 = () => {
ready: '', ready: '',
delivered: '', delivered: '',
cancellled: '', cancellled: '',
// "promoid": 0,
// "promoname": "",
// "promoterms": "",
// "promovalue": 0,
// "promoamount": 0,
orderamount: totalCharge, orderamount: totalCharge,
taxamount: 0, taxamount: 0,
ordercharges: 0, ordercharges: 0,
@@ -1027,12 +1021,9 @@ const Createorder1 = () => {
deliverytime: `${dayjs(startdate).format('YYYY-MM-DD')} ${dayjs(selectedtime.$d).format('HH:mm:ss')}`, deliverytime: `${dayjs(startdate).format('YYYY-MM-DD')} ${dayjs(selectedtime.$d).format('HH:mm:ss')}`,
deliverylocationid: clientinfo.deliverylocationid, deliverylocationid: clientinfo.deliverylocationid,
deliveryaddress: clientinfo.address, deliveryaddress: clientinfo.address,
// "pickupaddress": tenantinfo.locationaddress,// pickupaddress: tenantinfo.address,
// "pickuplat": tenantinfo.locationlatitude,// pickuplat: startPoint.latitude,
// "pickuplong": tenantinfo.locationlong,// pickuplong: startPoint.longitude,
pickupaddress: tenantinfo.address, //
pickuplat: startPoint.latitude, //
pickuplong: startPoint.longitude, //
ordernotes: otherinstructions, ordernotes: otherinstructions,
remarks: '', remarks: '',
tenantuserid: parseInt(localStorage.getItem('userid')), tenantuserid: parseInt(localStorage.getItem('userid')),
@@ -1047,7 +1038,7 @@ const Createorder1 = () => {
kms: distance kms: distance
} }
]; ];
if (!tenantid) { if (!tid) {
opentoast('Choose Client '); opentoast('Choose Client ');
} else if (!tenantinfo.address) { } else if (!tenantinfo.address) {
opentoast('Choose Pickup Location'); opentoast('Choose Pickup Location');