feat: Control the payment method from invoice form

This commit is contained in:
Ahmed Bouhuolia
2024-09-22 21:23:02 +02:00
parent 9827a84857
commit eb5fdbf4ee
11 changed files with 295 additions and 20 deletions

View File

@@ -260,8 +260,8 @@ export default class SaleInvoicesController extends BaseController {
check('pdf_template_id').optional({ nullable: true }).isNumeric().toInt(),
// Payment methods.
check('payment_methods').optional({ nullable: true }).isArray({ min: 1 }),
check('payment_methods.*.payment_integration_id').exists(),
check('payment_methods').optional({ nullable: true }).isArray(),
check('payment_methods.*.payment_integration_id').exists().toInt(),
check('payment_methods.*.enable').exists().isBoolean(),
];
}