|
@@ -276,7 +276,8 @@ class TPlusServerService extends Service
|
|
|
COALESCE(sd_b.quantity, 0) as quantity,
|
|
|
COALESCE(sd_b.taxPrice, 0) as price_3,
|
|
|
COALESCE(sd_b.taxAmount, 0) as price_3_total,
|
|
|
- COALESCE(sd_b.ID, 0) as id_detail
|
|
|
+ COALESCE(sd_b.ID, 0) as id_detail,
|
|
|
+ COALESCE(sd_b.pubuserdefdecm9, 0) as is_activity
|
|
|
")
|
|
|
->get();
|
|
|
|
|
@@ -335,6 +336,7 @@ class TPlusServerService extends Service
|
|
|
do {
|
|
|
$rows = $this->databaseService->table('SA_SaleInvoice_b as si_b')
|
|
|
->join('SA_SaleInvoice as si', 'si_b.idSaleInvoiceDTO', '=', 'si.ID')
|
|
|
+ ->leftJoin('SA_SaleDelivery_b as sd_b', 'si_b.sourceVoucherDetailId', '=', 'sd_b.ID')
|
|
|
->leftJoin('AA_Partner as pn', 'si.idsettlecustomer', '=', 'pn.ID')
|
|
|
->leftJoin('AA_Person as ps', 'si.idclerk', '=', 'ps.ID')
|
|
|
->leftJoin('AA_Inventory as it', 'si_b.idinventory', '=', 'it.ID')
|
|
@@ -362,7 +364,8 @@ class TPlusServerService extends Service
|
|
|
COALESCE(si_b.taxAmount, 0) as price_1_total,
|
|
|
COALESCE(si_b.ID, 0) as id_detail,
|
|
|
COALESCE(si_b.sourceVoucherDetailId, 0) as id_detail_upstream,
|
|
|
- COALESCE(si_b.sourceVoucherCode, '') as order_number_upstream
|
|
|
+ COALESCE(si_b.sourceVoucherCode, '') as order_number_upstream,
|
|
|
+ COALESCE(sd_b.pubuserdefdecm9, 0) as is_activity
|
|
|
")
|
|
|
->get();
|
|
|
|
|
@@ -417,6 +420,7 @@ class TPlusServerService extends Service
|
|
|
->join('ARAP_ReceivePayment as rp', 'rp_b.idArapReceivePaymentDTO', '=', 'rp.ID')
|
|
|
->leftJoin('SA_SaleInvoice_b as si_b', 'rp_b.voucherDetailID', '=', 'si_b.ID')
|
|
|
->leftJoin('SA_SaleInvoice as si', 'si_b.idSaleInvoiceDTO', '=', 'si.ID')
|
|
|
+ ->leftJoin('SA_SaleDelivery_b as sd_b', 'si_b.sourceVoucherDetailId', '=', 'sd_b.ID')
|
|
|
->leftJoin('AA_Partner as pn', 'si.idsettlecustomer', '=', 'pn.ID')
|
|
|
->leftJoin('AA_Person as ps', 'rp.idperson', '=', 'ps.ID')
|
|
|
->leftJoin('AA_Inventory as it', 'si_b.idinventory', '=', 'it.ID')
|
|
@@ -446,7 +450,8 @@ class TPlusServerService extends Service
|
|
|
COALESCE(rp_b.amount, 0) as payment_amount,
|
|
|
COALESCE(rp_b.ID, 0) as id_detail,
|
|
|
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,
|
|
|
+ COALESCE(sd_b.pubuserdefdecm9, 0) as is_activity
|
|
|
")
|
|
|
->get();
|
|
|
|
|
@@ -552,6 +557,7 @@ class TPlusServerService extends Service
|
|
|
'payment_amount' => $item->payment_amount ?? 0,
|
|
|
'id_detail_upstream' => $item->id_detail_upstream?? 0,
|
|
|
'order_number_upstream' => $item->order_number_upstream ?? "",
|
|
|
+ 'is_activity' => $item->is_activity ?? 0,
|
|
|
'crt_time' => $time,
|
|
|
];
|
|
|
})->toArray();
|
|
@@ -691,6 +697,7 @@ class TPlusServerService extends Service
|
|
|
$table->bigInteger('id_detail')->default(0);
|
|
|
$table->bigInteger('id_detail_upstream')->default(0);
|
|
|
$table->string('order_number_upstream', 100)->nullable();
|
|
|
+ $table->decimal('is_activity', 2, 0)->default(0);
|
|
|
});
|
|
|
}
|
|
|
}
|