feat: add bank account relation to PurchaseReceiptPayments and update related services
- Added bank account relation to PurchaseReceiptPayments model. - Updated BankAccount model to include purchaseReceiptPayments relation. - Modified PurchaseReceiptPayments service to handle bank account data during payment creation. - Enhanced SuppliersService to order suppliers by creation date. - Updated SupplierInvoicesService to include bank account details in invoice payments and order payments by payedAt. - Added foreign key constraint for bankAccountId in PurchaseReceiptPayments table.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user