mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 10:56:27 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8080b89c46 | |||
| 6dbd9b6246 |
@@ -334,7 +334,12 @@ const getSalesKMT = async (trx, code, date, invoice) => {
|
|||||||
.where('tdpr.c_status', '=', 'S')
|
.where('tdpr.c_status', '=', 'S')
|
||||||
.whereNotNull('tdsi.c_return_sap')
|
.whereNotNull('tdsi.c_return_sap')
|
||||||
.whereRaw(
|
.whereRaw(
|
||||||
`tdskm.c_sales_no NOT IN (SELECT c_reservation_no FROM payment.t_d_cash_in_detail WHERE b_reversal IS NOT TRUE)`
|
`NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM payment.t_d_cash_in_detail cid
|
||||||
|
WHERE cid.c_reservation_no = tdskm.c_sales_no
|
||||||
|
AND cid.b_reversal IS NOT TRUE
|
||||||
|
)`
|
||||||
);
|
);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@@ -364,7 +369,11 @@ const getSalesInternal = async (trx, code, date, invoice) => {
|
|||||||
.where('tdpr.c_status', '=', 'S')
|
.where('tdpr.c_status', '=', 'S')
|
||||||
.whereNotNull('tdsi.c_return_sap_fi')
|
.whereNotNull('tdsi.c_return_sap_fi')
|
||||||
.whereRaw(
|
.whereRaw(
|
||||||
`tdskm.c_sales_no NOT IN (SELECT c_reservation_no FROM payment.t_d_cash_in_detail WHERE b_reversal IS NOT TRUE)`
|
`NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM payment.t_d_cash_in_detail cid
|
||||||
|
WHERE cid.c_reservation_no = tdskm.c_sales_no
|
||||||
|
AND cid.b_reversal IS NOT TRUE)`
|
||||||
);
|
);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@@ -394,7 +403,12 @@ const getTopUpCashlessInternal = async (trx, code, date, invoice) => {
|
|||||||
.where('tdpr.c_status', '=', 'S')
|
.where('tdpr.c_status', '=', 'S')
|
||||||
.whereNotNull('tdsi.c_return_sap')
|
.whereNotNull('tdsi.c_return_sap')
|
||||||
.whereRaw(
|
.whereRaw(
|
||||||
`tdskm.c_topup_no NOT IN (SELECT c_reservation_no FROM payment.t_d_cash_in_detail WHERE b_reversal IS NOT TRUE)`
|
`NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM payment.t_d_cash_in_detail cid
|
||||||
|
WHERE cid.c_reservation_no = tdskm.c_topup_no
|
||||||
|
AND cid.b_reversal IS NOT TRUE
|
||||||
|
)`
|
||||||
);
|
);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Reference in New Issue
Block a user