diff --git a/README.md b/README.md index a5d6b32..a22588e 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ More info at https://github.com/nevill/zongji/issues/143 git clone https://github.com/juan-ferrer-toribio/zongji.git cd zongji git checkout fix-143 +npm install ``` Apply *zongji.sql* script into DB. diff --git a/queues/clientRisk.yml b/queues/clientRisk.yml new file mode 100644 index 0000000..6a74902 --- /dev/null +++ b/queues/clientRisk.yml @@ -0,0 +1,29 @@ +query: + client: CALL vn.ticket_setRisk(:id) +includeSchema: + vn: + ticket: + key: clientFk + scope: client + columns: + - id + - clientFk + - shipped + - totalWithVat + - refFk + receipt: + key: clientFk + scope: client + columns: + - payed + - clientFk + - amountPaid + hedera: + tpvTransaction: + key: clientFk + scope: client + columns: + - clientFk + - amount + - status + - receiptFk \ No newline at end of file diff --git a/queues/expeditionSelfConsumptionPackaging.yml b/queues/expeditionSelfConsumptionPackaging.yml new file mode 100644 index 0000000..dc0685b --- /dev/null +++ b/queues/expeditionSelfConsumptionPackaging.yml @@ -0,0 +1,8 @@ +query: + expedition: CALL vn.expedition_selfConsumptionPackaging(:id, 'add') +includeSchema: + vn: + expedition: + key: id + columns: + - id diff --git a/queues/saleComponentLack.yml b/queues/saleComponentLack.yml new file mode 100644 index 0000000..42c3dcc --- /dev/null +++ b/queues/saleComponentLack.yml @@ -0,0 +1,21 @@ +query: + sale: CALL vn.sale_setProblemComponentLack(:id) + component: CALL vn.sale_setProblemComponentLackByComponent(:id) +includeSchema: + vn: + sale: + key: id + columns: + - id + saleComponent: + key: saleFk + scope: sale + columns: + - id + - saleFk + - componentFk + component: + key: id + columns: + - id + - isRequired \ No newline at end of file diff --git a/queues/ticketFreeze.yml b/queues/ticketFreeze.yml new file mode 100644 index 0000000..51bdf70 --- /dev/null +++ b/queues/ticketFreeze.yml @@ -0,0 +1,15 @@ +query: + client: CALL vn.ticket_setProblemFreeze(:id) +includeSchema: + vn: + client: + key: id + columns: + - id + - isFreezed + ticket: + key: clientFk + scope: client + columns: + - id + - clientFk \ No newline at end of file diff --git a/queues/ticketIsTaxDataChecked.yml b/queues/ticketIsTaxDataChecked.yml new file mode 100644 index 0000000..27b3e19 --- /dev/null +++ b/queues/ticketIsTaxDataChecked.yml @@ -0,0 +1,15 @@ +query: + client: CALL vn.ticket_setProblemTaxDataChecked(:id) +includeSchema: + vn: + client: + key: id + columns: + - id + - isTaxDataChecked + ticket: + key: clientFk + scope: client + columns: + - id + - clientFk \ No newline at end of file diff --git a/queues/ticketIsTooLittle.yml b/queues/ticketIsTooLittle.yml new file mode 100644 index 0000000..9c94753 --- /dev/null +++ b/queues/ticketIsTooLittle.yml @@ -0,0 +1,36 @@ +query: + ticket: CALL vn.ticket_setProblemTooLittle(:id) + item: CALL vn.ticket_setProblemTooLittleItemCost(:id) + config: CALL vn.ticket_setProblemTooLittleItemCost(NULL) +includeSchema: + vn: + ticket: + key: id + columns: + - id + - totalWithoutVat + - warehouseFk + events: + - updaterows + sale: + key: ticketFk + scope: ticket + columns: + - id + - ticketFk + - itemFk + - quantity + itemCost: + key: itemFk + scope: item + columns: + - itemFk + - warehouseFk + - cm3delivery + volumeConfig: + scope: config + columns: + - minTicketValue + - minTicketVolume + events: + - updaterows \ No newline at end of file diff --git a/queues/ticketRequest.yml b/queues/ticketRequest.yml new file mode 100644 index 0000000..fcfd7dc --- /dev/null +++ b/queues/ticketRequest.yml @@ -0,0 +1,16 @@ +query: + ticket: CALL vn.ticket_setProblemRequest(:id) +includeSchema: + vn: + ticket: + key: id + columns: + - id + events: + - updaterows + ticketRequest: + key: ticketFk + scope: ticket + columns: + - ticketFk + - isOk \ No newline at end of file diff --git a/queues/ticketRisk.yml b/queues/ticketRisk.yml new file mode 100644 index 0000000..717467b --- /dev/null +++ b/queues/ticketRisk.yml @@ -0,0 +1,17 @@ +query: + ticket: CALL vn.ticket_setProblemRisk(:id) + client: CALL vn.ticket_setProblemRiskByClient(:id) +includeSchema: + vn: + ticket: + key: id + columns: + - id + - clientFk + - risk + client: + key: id + scope: client + columns: + - id + - credit \ No newline at end of file diff --git a/queues/ticketTotal.yml b/queues/ticketTotal.yml index 2128d8c..8c43555 100644 --- a/queues/ticketTotal.yml +++ b/queues/ticketTotal.yml @@ -2,6 +2,7 @@ query: ticket: CALL vn.ticket_recalc(:id, NULL) client: CALL vn.ticket_recalcByScope('client', :id) address: CALL vn.ticket_recalcByScope('address', :id) + item: CALL vn.ticket_recalcByScope('item', :id) includeSchema: vn: ticket: @@ -40,3 +41,10 @@ includeSchema: key: id columns: - isEqualizated + itemTaxCountry: + key: itemFk + scope: item + columns: + - itemFk + - countryFk + - taxClassFk diff --git a/queues/ticketVolume.yml b/queues/ticketVolume.yml new file mode 100644 index 0000000..8373552 --- /dev/null +++ b/queues/ticketVolume.yml @@ -0,0 +1,20 @@ +query: + ticket: CALL vn.ticket_setVolume(:id) + item: CALL vn.ticket_setVolumeItemCost(:id) +includeSchema: + vn: + sale: + key: ticketFk + scope: ticket + columns: + - id + - ticketFk + - itemFk + - quantity + itemCost: + key: itemFk + scope: item + columns: + - itemFk + - warehouseFk + - cm3delivery \ No newline at end of file