cqp 1 week ago
parent
commit
16906ca460
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Service/TPlusServerService.php

+ 2 - 1
app/Service/TPlusServerService.php

@@ -517,7 +517,7 @@ class TPlusServerService extends Service
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.quantity, 0) ELSE 0 END as quantity,
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.quantity, 0) ELSE 0 END as quantity,
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.taxPrice, 0) ELSE 0 END as price_1,
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.taxPrice, 0) ELSE 0 END as price_1,
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.taxAmount, 0) ELSE 0 END as price_1_total,
                         CASE WHEN rp_b.idvouchertype = 20 THEN COALESCE(si_b.taxAmount, 0) ELSE 0 END as price_1_total,
-                        COALESCE(rp_b.amount, 0) as payment_amount,
+                        COALESCE(rp_b.origCurrentAmount, 0) as payment_amount,
                         COALESCE(rp_b.ID, 0) as id_detail,
                         COALESCE(rp_b.ID, 0) as id_detail,
                         COALESCE(rp_b.voucherDetailID, 0) as id_detail_upstream,
                         COALESCE(rp_b.voucherDetailID, 0) as id_detail_upstream,
                         COALESCE(rp_b.voucherCode, '') as order_number_upstream,
                         COALESCE(rp_b.voucherCode, '') as order_number_upstream,
@@ -525,6 +525,7 @@ class TPlusServerService extends Service
                         rp_b.idvouchertype as voucher_type
                         rp_b.idvouchertype as voucher_type
                     ")
                     ")
                     ->get();
                     ->get();
+//                COALESCE(rp_b.amount, 0) as payment_amount,
 
 
                 if ($rows->isEmpty()) break;
                 if ($rows->isEmpty()) break;