refs #5874 feat: refactorizado proceso facturación #1658

Merged
vicent merged 3 commits from hotfix_makeInvoice-refactor into master 2023-07-11 09:49:37 +00:00
4 changed files with 8 additions and 13 deletions
Showing only changes of commit da13f0811c - Show all commits

View File

@ -68,7 +68,7 @@
</span>
</vn-td>
<vn-td number>{{::clientInforma.rating}}</vn-td>
<vn-td>{{::clientInforma.recommendedCredit | currency: 'EUR': 2}}</vn-td>
<vn-td number>{{::clientInforma.recommendedCredit | currency: 'EUR'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>

View File

@ -270,7 +270,7 @@
info="Invoices minus payments plus orders not yet invoiced">
</vn-label-value>
<vn-label-value label="Credit"
value="{{$ctrl.summary.credit | currency: 'EUR':2 }} "
value="{{$ctrl.summary.credit | currency: 'EUR'}} "
ng-class="{alert: $ctrl.summary.credit > $ctrl.summary.creditInsurance ||
($ctrl.summary.credit && $ctrl.summary.creditInsurance == null)}"
info="Verdnatura's maximum risk">
@ -297,7 +297,7 @@
info="Value from 1 to 20. The higher the better value">
</vn-label-value>
<vn-label-value label="Recommended credit"
value="{{$ctrl.summary.recommendedCredit | currency: 'EUR': 2}}">
value="{{$ctrl.summary.recommendedCredit | currency: 'EUR'}}">
</vn-label-value>
</vn-one>
</vn-horizontal>

View File

@ -88,8 +88,7 @@ module.exports = function(Self) {
const models = Self.app.models;
await models.Ticket.rawSql(`
DROP TEMPORARY TABLE IF EXISTS tmp.ticketToInvoice;
CREATE TEMPORARY TABLE tmp.ticketToInvoice
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketToInvoice
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT id

View File

@ -19,8 +19,7 @@ describe('ticket canBeInvoiced()', () => {
await ticket.updateAttribute('refFk', 'T1111111', options);
await models.Ticket.rawSql(`
DROP TEMPORARY TABLE IF EXISTS tmp.ticketToInvoice;
CREATE TEMPORARY TABLE tmp.ticketToInvoice
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketToInvoice
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT id
@ -52,8 +51,7 @@ describe('ticket canBeInvoiced()', () => {
await ticket.updateAttribute('totalWithVat', 0, options);
await models.Ticket.rawSql(`
DROP TEMPORARY TABLE IF EXISTS tmp.ticketToInvoice;
CREATE TEMPORARY TABLE tmp.ticketToInvoice
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketToInvoice
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT id
@ -89,8 +87,7 @@ describe('ticket canBeInvoiced()', () => {
await ticket.updateAttribute('shipped', shipped, options);
await models.Ticket.rawSql(`
DROP TEMPORARY TABLE IF EXISTS tmp.ticketToInvoice;
CREATE TEMPORARY TABLE tmp.ticketToInvoice
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketToInvoice
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT id
@ -118,8 +115,7 @@ describe('ticket canBeInvoiced()', () => {
const options = {transaction: tx};
await models.Ticket.rawSql(`
DROP TEMPORARY TABLE IF EXISTS tmp.ticketToInvoice;
CREATE TEMPORARY TABLE tmp.ticketToInvoice
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketToInvoice
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT id