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