mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
fix: sale receipt date formating.
This commit is contained in:
@@ -8,7 +8,7 @@ exports.up = function(knex) {
|
|||||||
table.date('receipt_date').index();
|
table.date('receipt_date').index();
|
||||||
table.string('receipt_number');
|
table.string('receipt_number');
|
||||||
table.string('reference_no');
|
table.string('reference_no');
|
||||||
table.string('email_send_to');
|
table.string('send_to_email');
|
||||||
table.text('receipt_message');
|
table.text('receipt_message');
|
||||||
table.text('statement');
|
table.text('statement');
|
||||||
table.timestamps();
|
table.timestamps();
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export default class SalesReceiptService {
|
|||||||
const amount = sumBy(saleReceiptDTO.entries, e => ItemEntry.calcAmount(e));
|
const amount = sumBy(saleReceiptDTO.entries, e => ItemEntry.calcAmount(e));
|
||||||
const saleReceiptObj = {
|
const saleReceiptObj = {
|
||||||
amount,
|
amount,
|
||||||
...formatDateFields(saleReceiptDTO, ['receipt_date'])
|
...formatDateFields(saleReceiptDTO, ['receiptDate'])
|
||||||
};
|
};
|
||||||
|
|
||||||
// Validate receipt deposit account existance and type.
|
// Validate receipt deposit account existance and type.
|
||||||
@@ -159,7 +159,7 @@ export default class SalesReceiptService {
|
|||||||
const amount = sumBy(saleReceiptDTO.entries, e => ItemEntry.calcAmount(e));
|
const amount = sumBy(saleReceiptDTO.entries, e => ItemEntry.calcAmount(e));
|
||||||
const saleReceiptObj = {
|
const saleReceiptObj = {
|
||||||
amount,
|
amount,
|
||||||
...formatDateFields(saleReceiptDTO, ['receipt_date'])
|
...formatDateFields(saleReceiptDTO, ['receiptDate'])
|
||||||
};
|
};
|
||||||
// Retrieve sale receipt or throw not found service error.
|
// Retrieve sale receipt or throw not found service error.
|
||||||
const oldSaleReceipt = await this.getSaleReceiptOrThrowError(tenantId, saleReceiptId);
|
const oldSaleReceipt = await this.getSaleReceiptOrThrowError(tenantId, saleReceiptId);
|
||||||
|
|||||||
Reference in New Issue
Block a user