feat(design): fix issues in sidebar design.

feat(sales): reference number auto-increment optimizations.
fix(payments): payment receive/made statement.
This commit is contained in:
a.bouhuolia
2021-03-11 14:29:38 +02:00
parent 59f8010122
commit 30cd6c8a61
62 changed files with 921 additions and 378 deletions

View File

@@ -107,7 +107,7 @@ export default class BillsPayments extends BaseController {
check('payment_account_id').exists().isNumeric().toInt(),
check('payment_number').optional({ nullable: true }).trim().escape(),
check('payment_date').exists(),
check('description').optional().trim().escape(),
check('statement').optional().trim().escape(),
check('reference').optional().trim().escape(),
check('entries').exists().isArray({ min: 1 }),

View File

@@ -52,16 +52,10 @@ export default {
key: "number_prefix",
type: "string",
},
],
bills: [
{
key: "next_number",
type: "number",
},
{
key: "number_prefix",
type: "string",
},
key: "auto_increment",
type: "boolean",
}
],
bill_payments: [
{
@@ -82,6 +76,10 @@ export default {
key: "number_prefix",
type: "string",
},
{
key: "auto_increment",
type: "boolean",
}
],
sales_receipts: [
{
@@ -92,6 +90,10 @@ export default {
key: "number_prefix",
type: "string",
},
{
key: "auto_increment",
type: "boolean",
},
{
key: "preferred_deposit_account",
type: "number",
@@ -107,8 +109,8 @@ export default {
type: "string",
},
{
key: 'increment_mode',
type: 'string'
key: "auto_increment",
type: "boolean",
}
],
payment_receives: [
@@ -120,6 +122,10 @@ export default {
key: "number_prefix",
type: "string",
},
{
key: "auto_increment",
type: "boolean",
}
],
items: [
{

View File

@@ -10,7 +10,7 @@ exports.up = function(knex) {
table.string('reference_no').index();
table.integer('deposit_account_id').unsigned().references('id').inTable('accounts');
table.string('payment_receive_no').nullable();
table.text('description');
table.text('statement');
table.integer('user_id').unsigned().index();
table.timestamps();
});

View File

@@ -11,7 +11,7 @@ exports.up = function(knex) {
table.string('payment_method');
table.string('reference');
table.integer('user_id').unsigned().index();
table.text('description');
table.text('statement');
table.timestamps();
});
};

View File

@@ -17,6 +17,7 @@ export interface IBillPayment {
paymentDate: Date,
userId: number,
entries: IBillPaymentEntry[],
statement: string,
}
export interface IBillPaymentEntryDTO {
@@ -29,7 +30,7 @@ export interface IBillPaymentDTO {
paymentAccountId: number,
paymentNumber?: string,
paymentDate: Date,
description: string,
statement: string,
reference: string,
entries: IBillPaymentEntryDTO[],
};

View File

@@ -9,7 +9,7 @@ export interface IPaymentReceive {
referenceNo: string,
depositAccountId: number,
paymentReceiveNo: string,
description: string,
statement: string,
entries: IPaymentReceiveEntry[],
userId: number,
};
@@ -20,7 +20,7 @@ export interface IPaymentReceiveCreateDTO {
referenceNo: string,
depositAccountId: number,
paymentReceiveNo?: string,
description: string,
statement: string,
entries: IPaymentReceiveEntryDTO[],
};
@@ -31,7 +31,7 @@ export interface IPaymentReceiveEditDTO {
referenceNo: string,
depositAccountId: number,
paymentReceiveNo?: string,
description: string,
statement: string,
entries: IPaymentReceiveEntryDTO[],
};