delivery slot updated in orders and deliveries fix
This commit is contained in:
@@ -138,12 +138,22 @@ const (
|
||||
a.deliverycustomer,a.deliverycontactno,a.deliverylocation as deliverysuburb, a.deliverycity,a.paymenttype, a.smsdelivery, a.orderamount,
|
||||
b.tenantname, b.tenanttoken, b.primarycontact AS tenantcontactno, b.postcode AS tenantpostcode, b.suburb AS tenantsuburb,b.city AS tenantcity,
|
||||
c.locationname, c.contactno AS locationcontactno, c.postcode AS locationpostcode, c.suburb AS locationsuburb, c.city AS locationcity,
|
||||
d.locationname AS applocation
|
||||
d.locationname AS applocation,
|
||||
-- The delivery window, same as the 'base' select above.
|
||||
--
|
||||
-- BOTH selects need it. 'base' backs the console's list; this one backs the
|
||||
-- partner, customer, user and admin reads -- including the customer app's
|
||||
-- own order history, which is where a shopper expects to see the window
|
||||
-- they picked. Fixing one and not the other is how a field ends up present
|
||||
-- on some screens and silently absent on others.
|
||||
a.deliveryslotid, a.deliveryslotdate, s.slotkey, s.name AS deliveryslotname,
|
||||
s.starttime AS deliveryslotstart, s.endtime AS deliveryslotend
|
||||
FROM orders a
|
||||
LEFT JOIN tenants b ON a.tenantid = b.tenantid
|
||||
LEFT JOIN tenantlocations c ON a.locationid = c.locationid
|
||||
LEFT JOIN app_location d ON a.applocationid = d.applocationid
|
||||
LEFT JOIN app_locationconfig e ON d.applocationid = e.applocationid`
|
||||
LEFT JOIN app_locationconfig e ON d.applocationid = e.applocationid
|
||||
LEFT JOIN deliveryslots s ON a.deliveryslotid = s.slotid`
|
||||
)
|
||||
|
||||
func (r *orderRepository) GetTenantOrders(input models.DeliveryQuery) ([]models.OrderInfo, error) {
|
||||
|
||||
Reference in New Issue
Block a user