diff --git a/api/orders/getDetail.php b/api/orders/getDetail.php index 2200bb3..f6392b4 100644 --- a/api/orders/getDetail.php +++ b/api/orders/getDetail.php @@ -42,7 +42,7 @@ try { SELECT o.ID, o.UUID, o.BusinessID, o.UserID, o.ServicePointID, o.StatusID, o.OrderTypeID, o.Remarks, o.AddedOn, o.LastEditedOn, - o.SubmittedOn, o.TipAmount, + o.SubmittedOn, o.TipAmount, o.PlatformFee, u.FirstName, u.LastName, u.ContactNumber, u.EmailAddress, sp.Name AS Name, sp.TypeID AS TypeID, b.Name AS BizName, b.TaxRate @@ -112,7 +112,8 @@ try { $taxRate = (is_numeric($qOrder['TaxRate']) && (float) $qOrder['TaxRate'] > 0) ? (float) $qOrder['TaxRate'] : 0; $tax = $subtotal * $taxRate; $tip = is_numeric($qOrder['TipAmount']) ? (float) $qOrder['TipAmount'] : 0; - $total = $subtotal + $tax + $tip; + $platformFee = is_numeric($qOrder['PlatformFee']) ? (float) $qOrder['PlatformFee'] : 0; + $total = $subtotal + $tax + $tip + $platformFee; // Get staff who worked on this order $qStaff = queryTimed(" @@ -157,6 +158,7 @@ try { 'Subtotal' => $subtotal, 'Tax' => $tax, 'Tip' => $tip, + 'PlatformFee' => $platformFee, 'Total' => $total, 'Notes' => $qOrder['Remarks'], 'CreatedOn' => toISO8601($qOrder['AddedOn']),