feat: payment receive/made number optional.

This commit is contained in:
Ahmed Bouhuolia
2020-11-24 11:31:06 +02:00
parent 0321f29442
commit 218d90c571
4 changed files with 87 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ export default class BillsPayments extends BaseController {
return [
check('vendor_id').exists().isNumeric().toInt(),
check('payment_account_id').exists().isNumeric().toInt(),
check('payment_number').exists().trim().escape(),
check('payment_number').optional({ nullable: true }).trim().escape(),
check('payment_date').exists(),
check('description').optional().trim().escape(),
check('reference').optional().trim().escape(),

View File

@@ -27,7 +27,7 @@ export interface IBillPaymentEntryDTO {
export interface IBillPaymentDTO {
vendorId: number,
paymentAccountId: number,
paymentNumber: string,
paymentNumber?: string,
paymentDate: Date,
description: string,
reference: string,

View File

@@ -19,7 +19,7 @@ export interface IPaymentReceiveDTO {
amount: number,
referenceNo: string,
depositAccountId: number,
paymentReceiveNo: string,
paymentReceiveNo?: string,
description: string,
entries: IPaymentReceiveEntryDTO[],
};