feat: add discount to sale and purchase transactions

This commit is contained in:
Ahmed Bouhuolia
2024-11-28 10:12:48 +02:00
parent 09b98664c5
commit aa4aaeb612
3 changed files with 37 additions and 0 deletions

View File

@@ -281,6 +281,13 @@ export default class SaleInvoicesController extends BaseController {
check('payment_methods').optional({ nullable: true }).isArray(),
check('payment_methods.*.payment_integration_id').exists().toInt(),
check('payment_methods.*.enable').exists().isBoolean(),
// Discount
check('discount').optional({ nullable: true }).isNumeric().toFloat(),
check('discount_type').optional({ nullable: true }).isString().trim(),
// Adjustments
check('adjustment').optional({ nullable: true }).isArray(),
];
}