mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 08:46:27 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8080b89c46 | |||
| 6dbd9b6246 | |||
| 5bafb81d8d | |||
| 1dd7860c0b | |||
| 1cf06d1fdd | |||
| be2cedc869 | |||
| f5f75381ca | |||
| 5cbdccca11 |
@@ -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;
|
||||||
@@ -583,7 +597,7 @@ const getPartnerReconSalesInternal = async (trx) => {
|
|||||||
'tmp.c_account_sales_revenue',
|
'tmp.c_account_sales_revenue',
|
||||||
'tmp.c_account_code_sales_ar',
|
'tmp.c_account_code_sales_ar',
|
||||||
trx.raw(`CASE WHEN to_char(tdpr.d_payment, 'YYYYMM') >= to_char(tdsi.d_invoice_date, 'YYYYMM')
|
trx.raw(`CASE WHEN to_char(tdpr.d_payment, 'YYYYMM') >= to_char(tdsi.d_invoice_date, 'YYYYMM')
|
||||||
THEN 'IP' ELSE 'OP'
|
THEN 'IP' ELSE 'IP'
|
||||||
END c_in_period`),
|
END c_in_period`),
|
||||||
])
|
])
|
||||||
.from('trx.t_d_sales_internal AS tdskm')
|
.from('trx.t_d_sales_internal AS tdskm')
|
||||||
@@ -627,7 +641,7 @@ const getPartnerReconTopUpCashlessInternal = async (trx) => {
|
|||||||
'tmp.c_account_topup',
|
'tmp.c_account_topup',
|
||||||
'tmp.c_account_code_topup',
|
'tmp.c_account_code_topup',
|
||||||
trx.raw(`CASE WHEN to_char(tdpr.d_payment, 'YYYYMM') >= to_char(tdsi.d_invoice_date, 'YYYYMM')
|
trx.raw(`CASE WHEN to_char(tdpr.d_payment, 'YYYYMM') >= to_char(tdsi.d_invoice_date, 'YYYYMM')
|
||||||
THEN 'IP' ELSE 'OP'
|
THEN 'IP' ELSE 'IP'
|
||||||
END c_in_period`),
|
END c_in_period`),
|
||||||
])
|
])
|
||||||
.from('trx.t_d_topup_cashless_internal AS tdskm')
|
.from('trx.t_d_topup_cashless_internal AS tdskm')
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ const completingDataSalesInternal = async (ppn) => {
|
|||||||
trx.t_d_sales_internal.is_complete is not true
|
trx.t_d_sales_internal.is_complete is not true
|
||||||
AND trx.t_d_sales_internal.i_card_price > 0
|
AND trx.t_d_sales_internal.i_card_price > 0
|
||||||
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
||||||
|
AND t_m_card_theme.c_status = 'A'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
trx.t_d_sales_internal.c_card_number,
|
trx.t_d_sales_internal.c_card_number,
|
||||||
t_m_card_theme.c_card_type_code,
|
t_m_card_theme.c_card_type_code,
|
||||||
@@ -214,6 +215,7 @@ const completingDataSalesInternal = async (ppn) => {
|
|||||||
AND trx.t_d_sales_internal.i_old_card_price > 0
|
AND trx.t_d_sales_internal.i_old_card_price > 0
|
||||||
AND trx.t_d_sales_internal.c_category IN ('N', 'W')
|
AND trx.t_d_sales_internal.c_category IN ('N', 'W')
|
||||||
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
||||||
|
AND t_m_card_theme.c_status = 'A'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
trx.t_d_sales_internal.c_old_card_number,
|
trx.t_d_sales_internal.c_old_card_number,
|
||||||
t_m_card_theme.c_card_type_code,
|
t_m_card_theme.c_card_type_code,
|
||||||
@@ -275,6 +277,7 @@ const completingDataSalesNewCard = async (ppn) => {
|
|||||||
trx.t_d_sales_internal.is_complete is not true
|
trx.t_d_sales_internal.is_complete is not true
|
||||||
AND trx.t_d_sales_internal.i_card_price > 0
|
AND trx.t_d_sales_internal.i_card_price > 0
|
||||||
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
||||||
|
AND t_m_card_theme.c_status = 'A'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
trx.t_d_sales_internal.c_card_number,
|
trx.t_d_sales_internal.c_card_number,
|
||||||
t_m_card_theme.c_card_type_code,
|
t_m_card_theme.c_card_type_code,
|
||||||
@@ -320,6 +323,7 @@ const completingDataSalesOldCard = async (ppn) => {
|
|||||||
AND trx.t_d_sales_internal.i_old_card_price > 0
|
AND trx.t_d_sales_internal.i_old_card_price > 0
|
||||||
AND trx.t_d_sales_internal.c_category IN ('N', 'W')
|
AND trx.t_d_sales_internal.c_category IN ('N', 'W')
|
||||||
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
AND trx.t_d_sales_internal.i_sales_invoice_internal is null
|
||||||
|
AND t_m_card_theme.c_status = 'A'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
trx.t_d_sales_internal.c_old_card_number,
|
trx.t_d_sales_internal.c_old_card_number,
|
||||||
t_m_card_theme.c_card_type_code,
|
t_m_card_theme.c_card_type_code,
|
||||||
|
|||||||
Generated
+2606
-8412
File diff suppressed because it is too large
Load Diff
+8
-6
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "topuponline",
|
"name": "onlinetopup-v1",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"description": "pos cms integration",
|
"description": "update packages",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon index",
|
"start": "nodemon index",
|
||||||
@@ -37,11 +37,13 @@
|
|||||||
"moment": "^2.29.3",
|
"moment": "^2.29.3",
|
||||||
"node-cron": "^3.0.1",
|
"node-cron": "^3.0.1",
|
||||||
"pg": "^8.6.0",
|
"pg": "^8.6.0",
|
||||||
"pm2": "^5.2.0",
|
"pm2": "^6.0.13",
|
||||||
"prom-client": "^14.2.0",
|
"prom-client": "^14.2.0",
|
||||||
"redis": "^4.6.5",
|
"redis": "^4.6.5",
|
||||||
"response-time": "^2.3.2",
|
"response-time": "^2.3.2",
|
||||||
|
"simple-update-notifier": "^2.0.0",
|
||||||
"sticky-session": "^0.1.0",
|
"sticky-session": "^0.1.0",
|
||||||
|
"superagent": "^10.2.3",
|
||||||
"winston": "^3.7.2",
|
"winston": "^3.7.2",
|
||||||
"winston-daily-rotate-file": "^4.7.1",
|
"winston-daily-rotate-file": "^4.7.1",
|
||||||
"winston-loki": "^6.0.6",
|
"winston-loki": "^6.0.6",
|
||||||
@@ -50,8 +52,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jest": "^29.0.2",
|
"jest": "^29.0.2",
|
||||||
"nodemon": "^2.0.7",
|
"nodemon": "^3.1.10",
|
||||||
"supertest": "^6.2.4"
|
"supertest": "^7.1.3"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"testEnvironment": "node",
|
"testEnvironment": "node",
|
||||||
|
|||||||
Reference in New Issue
Block a user