diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 8fb4fd1fd..723c8c4e4 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -158,7 +158,7 @@ INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `park INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`code`, `maxAmount`, `daysInFuture`) VALUES - (1, 'CC y Polizas de crédito', 'Transferencias', 'wireTransfer', NULL, 1), + (1, 'CC and credit policies', 'Transfers', 'wireTransfer', NULL, 1), (2, 'Cash', 'Cash', 'cash', 1000, 0), (3, 'Credit card', 'Credit Card', 'creditCard', NULL, 0), (4, 'Finalcial lines', NULL, NULL, NULL, 0), diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index 4e60a0cd1..c6a6e7ff9 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -68,12 +68,9 @@ class Controller extends Dialog { } this.maxAmount = accountingType && accountingType.maxAmount; - if (accountingType.daysInFuture) { - const date = new Date(); - date.setDate(date.getDate() + accountingType.daysInFuture); - this.receipt.payed = date; - } else - this.receipt.payed = new Date(); + this.receipt.payed = new Date(); + if (accountingType.daysInFuture) + this.receipt.payed.setDate(this.receipt.payed.getDate() + accountingType.daysInFuture); } }