feat: add supplier payment and allocation models, API, and frontend components

- Created `SupplierPayment` and `SupplierPaymentGRN` models for managing supplier payments and their allocations.
- Implemented API endpoints for listing and creating supplier payments.
- Developed frontend components for displaying and recording supplier payments, including a dialog for payment creation.
- Integrated GRN allocations into the payment creation process, ensuring total allocations match the payment amount.
- Added pagination and loading states for the payments list.
This commit is contained in:
Kalana B. Thilakarathna
2026-10-19 21:36:01 +05:30
parent 94db2a311c
commit b992d07689
25 changed files with 7744 additions and 57 deletions
@@ -1305,9 +1305,15 @@ namespace Distribution.Migrations
b.Property<int>("EntryMode")
.HasColumnType("int");
b.Property<Guid?>("FK_BankAccountId")
.HasColumnType("char(36)");
b.Property<Guid>("FK_InvoiceId")
.HasColumnType("char(36)");
b.Property<Guid?>("FK_ReceivedChequeId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
@@ -1319,8 +1325,12 @@ namespace Distribution.Migrations
b.HasKey("Id");
b.HasIndex("FK_BankAccountId");
b.HasIndex("FK_InvoiceId");
b.HasIndex("FK_ReceivedChequeId");
b.ToTable("Payments");
b.HasData(
@@ -2144,7 +2154,7 @@ namespace Distribution.Migrations
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<int>("CompanyId")
b.Property<int?>("CompanyId")
.HasColumnType("int");
b.Property<DateTime>("CreatedAt")
@@ -2518,7 +2528,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000001"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("ec13fdfa-d848-4004-b749-4b455ba0a77e"),
Id = new Guid("30f658ac-2c92-4cd8-ad47-10b0def2699c"),
IsActive = true
},
new
@@ -2526,7 +2536,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000002"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("66f41359-cf33-4bd9-a936-816f03b23da7"),
Id = new Guid("42ab2c52-eaf8-4a17-b67a-ccd66569e56a"),
IsActive = true
},
new
@@ -2534,7 +2544,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000003"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("369efbe7-f200-4b2e-bc15-858b6d2ca882"),
Id = new Guid("8afec825-27b3-4153-ad06-f8bcdbf93da8"),
IsActive = true
},
new
@@ -2542,7 +2552,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000004"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("adc14999-08af-4b4c-937d-3ecd7c35b709"),
Id = new Guid("4b427620-e99d-4068-a416-c3788d5bd9b5"),
IsActive = true
},
new
@@ -2550,7 +2560,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000005"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("f1bf4ccb-45c6-4915-b941-6b507eb1e44f"),
Id = new Guid("361f44ef-1cd1-48a9-be4d-4c068aacef1e"),
IsActive = true
},
new
@@ -2558,7 +2568,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000006"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("1cbd132a-ea3d-46b2-8150-c5a077b6b36a"),
Id = new Guid("11fc03ae-92ee-4336-ae57-29aac731ad51"),
IsActive = true
},
new
@@ -2566,7 +2576,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000007"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("362118bd-1d4c-4576-95f6-7da899bf7368"),
Id = new Guid("0b1f2b73-ef60-4634-864f-22a6c0cd1373"),
IsActive = true
},
new
@@ -2574,7 +2584,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000008"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("15e94675-d2ae-4f5a-8198-6297a26d7a2c"),
Id = new Guid("2380abf3-2bcd-4a9f-b447-5f1685df2fc8"),
IsActive = true
},
new
@@ -2582,7 +2592,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000009"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("4af2ab93-d3ba-4bda-b440-167f672cc166"),
Id = new Guid("240e4d6a-8306-40ba-aaec-8e05cd0347db"),
IsActive = true
},
new
@@ -2590,7 +2600,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000010"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("bc5ba5f8-f20a-432a-985b-95b9500ce693"),
Id = new Guid("cfde0aa6-e859-4f9c-8291-b0d886fcd4c9"),
IsActive = true
},
new
@@ -2598,7 +2608,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000011"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("4f43f82b-8e6a-4729-9ded-c78c7dde24a7"),
Id = new Guid("dae772c8-26ec-4b5c-8d7a-f3196510bf2c"),
IsActive = true
},
new
@@ -2606,7 +2616,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000012"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("7ac3df8c-f5c3-4d57-b537-5d5ca4ec1e11"),
Id = new Guid("3512c0a4-a5ae-4002-a779-7d3cc600ab61"),
IsActive = true
},
new
@@ -2614,7 +2624,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000013"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("44ec8d0f-f540-4786-9d9a-9194fa091286"),
Id = new Guid("f9e2a348-159e-47a2-b7be-a60f0254873f"),
IsActive = true
},
new
@@ -2622,7 +2632,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000014"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("143c4280-21be-4852-adc5-7cd17ab595fd"),
Id = new Guid("c8b4c181-5b08-45d2-818b-74bceeab78a8"),
IsActive = true
},
new
@@ -2630,7 +2640,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000015"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("d00b144e-bf2d-4a04-9c85-0c14544edf48"),
Id = new Guid("8fb4ff4c-c5bd-4afd-a08e-02861d63cb7b"),
IsActive = true
},
new
@@ -2638,7 +2648,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000016"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("9a72b7e4-1197-4032-8ec6-ebb3442a267f"),
Id = new Guid("edb3b711-d623-439d-811e-afaef8d0680d"),
IsActive = true
},
new
@@ -2646,7 +2656,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000017"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("5ec2af6e-d1db-4811-9c37-94a260e6ef9b"),
Id = new Guid("f33e4c62-d69f-4a91-8b62-acbd5351ea2a"),
IsActive = true
},
new
@@ -2654,7 +2664,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000018"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("a71aceba-5199-4824-8b4e-998b108c082c"),
Id = new Guid("c7c9d16c-e343-43e9-9e27-f38f903a5d00"),
IsActive = true
},
new
@@ -2662,7 +2672,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000019"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("4bd840bf-da52-46fd-b065-40253f915c7c"),
Id = new Guid("f5f4760a-8a45-46ca-8093-743c95b0313f"),
IsActive = true
},
new
@@ -2670,7 +2680,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000020"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("8b4d8558-dba9-45bb-b263-f066580a55e9"),
Id = new Guid("c5434801-146a-4fd9-9c29-a1145e7f7f00"),
IsActive = true
},
new
@@ -2678,7 +2688,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000021"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("0ee1a2e0-e4d2-4af3-9cca-ffad05bc1e20"),
Id = new Guid("6c085135-78a5-4e65-a380-ee090b07e2bb"),
IsActive = true
},
new
@@ -2686,7 +2696,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000022"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("700be5ec-0c11-497b-808a-80e7a854d2b4"),
Id = new Guid("bbde2785-a3df-4f81-bad1-0bc5afe5de57"),
IsActive = true
},
new
@@ -2694,7 +2704,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000023"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("b9978e5a-14b1-462a-9b7b-c9c32c4decb9"),
Id = new Guid("4421a0fb-bdd4-45a9-8dc0-d9b70f775e97"),
IsActive = true
},
new
@@ -2702,7 +2712,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000024"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("1e7cc9d4-f65e-434b-90e5-f78b4fda39b8"),
Id = new Guid("dba9dcb4-3b94-4ddc-89f3-552cfc109478"),
IsActive = true
},
new
@@ -2710,7 +2720,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000025"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("bfb3f80b-32c3-43b0-b216-f05e55f09360"),
Id = new Guid("d8f74160-c150-4d9c-aba6-e45e628c684e"),
IsActive = true
},
new
@@ -2718,7 +2728,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000026"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("fcfe2242-93ad-4c6d-8eec-3ec1f1270d0a"),
Id = new Guid("495fb68b-9f01-4538-9561-fefce0d39558"),
IsActive = true
},
new
@@ -2726,7 +2736,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000027"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("8e6eeb90-966f-4417-a1ae-148cdaa64904"),
Id = new Guid("3bdece9b-a798-4223-a23c-9c9dd10d042d"),
IsActive = true
},
new
@@ -2734,7 +2744,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000028"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("6df60aea-63f3-465e-96fb-9a7304ead3c2"),
Id = new Guid("6fa616eb-99fe-46b9-8305-908765d037fd"),
IsActive = true
},
new
@@ -2742,7 +2752,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000029"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("c0e21519-a095-4c7f-af42-e26efdcdd31e"),
Id = new Guid("7a07148a-1327-4e97-befc-b2045eacad21"),
IsActive = true
},
new
@@ -2750,7 +2760,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000030"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("496bbf8d-d84d-4c21-b190-bf95a06b4113"),
Id = new Guid("852e86d7-aa57-4a77-81c0-054f3fb4d7f7"),
IsActive = true
},
new
@@ -2758,7 +2768,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000031"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("36f55476-d749-459b-92d9-839919499460"),
Id = new Guid("3b767929-c973-41fb-a340-4ee5feb65619"),
IsActive = true
},
new
@@ -2766,7 +2776,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000032"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("d90301fa-8990-49cf-8fa0-228ea7e684bc"),
Id = new Guid("63619bbd-0352-41bd-9e1c-a3f7908fb5d2"),
IsActive = true
},
new
@@ -2774,7 +2784,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000033"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("8da4cd2a-1fd2-4417-bb6d-9e91174193f5"),
Id = new Guid("f6b4c8bf-a9b3-4179-9f57-a8584678c0d1"),
IsActive = true
},
new
@@ -2782,7 +2792,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000034"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("cc9bed46-a230-4611-88b4-d568abca857e"),
Id = new Guid("bb47b8ca-f7cf-40fe-8945-fc532a439b53"),
IsActive = true
},
new
@@ -2790,7 +2800,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000035"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("4d791413-ac44-4165-87b8-c28dbfa49230"),
Id = new Guid("52126271-ae3b-4b58-a9d2-50e2dd894087"),
IsActive = true
},
new
@@ -2798,7 +2808,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000036"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("2bb28028-8b12-4937-9dc6-68e35b100007"),
Id = new Guid("981e3358-85bb-47fe-a1f5-3a3a02cf47b1"),
IsActive = true
},
new
@@ -2806,7 +2816,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000037"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("fdc8d3d9-a32d-4322-8144-93ff677beea3"),
Id = new Guid("749408da-fcee-458d-9144-8d8dee928ba0"),
IsActive = true
},
new
@@ -2814,7 +2824,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000038"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("b1ea0901-08e8-4dea-8ac3-15b522a2f274"),
Id = new Guid("c157857c-fb0e-41fd-a414-c0f57a44b120"),
IsActive = true
},
new
@@ -2822,7 +2832,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000039"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("116ac7bf-741e-4d4f-a313-2e7946a50044"),
Id = new Guid("3217cdbc-76c9-4505-b9f3-23de91a6212b"),
IsActive = true
},
new
@@ -2830,7 +2840,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000040"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("7fd97ca6-a14b-4e42-8474-5471c0ef79a9"),
Id = new Guid("63526c52-18ba-40e0-9889-3bd3b7fc8161"),
IsActive = true
},
new
@@ -2838,7 +2848,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000041"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("e58f35b2-8308-4fbb-b3ca-db9d037347cd"),
Id = new Guid("260cf2fa-1ca6-4cd5-92ae-8c479a80e2f0"),
IsActive = true
},
new
@@ -2846,7 +2856,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000042"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("dc6b2750-083b-4653-a986-7af7aaec8136"),
Id = new Guid("130ab09c-8a36-4705-8235-9d00f75dd684"),
IsActive = true
},
new
@@ -2854,7 +2864,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000043"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("6629888a-eb6b-433f-bbfe-ee5d947fb5b2"),
Id = new Guid("41794774-e919-4f4e-a42a-5ae408d3407f"),
IsActive = true
},
new
@@ -2862,7 +2872,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000044"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("94b97271-7593-4cec-9290-802e9a26f0d8"),
Id = new Guid("2ff23d04-d1f6-4aa3-a48e-1c82bb9ad12a"),
IsActive = true
},
new
@@ -2870,7 +2880,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000045"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("0dc88aca-4e86-4712-988f-8db6a466531d"),
Id = new Guid("d36c81c0-8e9b-41ea-8e09-464a327a16d2"),
IsActive = true
},
new
@@ -2878,7 +2888,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000046"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("c8839187-4358-4218-bf3d-5ea4ed758661"),
Id = new Guid("6c51dfc1-63e0-46a6-b2bb-27c21c708b51"),
IsActive = true
},
new
@@ -2886,7 +2896,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000047"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("5c731906-8d81-4f85-abad-230050af0bd0"),
Id = new Guid("076333d5-b1f3-4b89-86fd-5a61a4451c88"),
IsActive = true
},
new
@@ -2894,7 +2904,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000048"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("d6e3db40-ca38-4caf-88d8-ce87475b4d87"),
Id = new Guid("7e834f3e-1424-4aaa-816e-d62da6df672b"),
IsActive = true
},
new
@@ -2902,7 +2912,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000049"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("398f1c4d-5d7d-4af4-9aa7-a88d7abf9a33"),
Id = new Guid("699fa06b-a7ff-4dbd-98a7-a29c2c361665"),
IsActive = true
},
new
@@ -2910,7 +2920,7 @@ namespace Distribution.Migrations
FK_RoleId = new Guid("10000000-0000-0000-0000-000000000007"),
FK_PermissionId = new Guid("20000000-0000-0000-0000-000000000050"),
CreatedAt = new DateTime(2026, 8, 18, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = new Guid("0f6c66e6-833c-4b52-ba2c-09da8dbead6f"),
Id = new Guid("00df5735-54c6-4cdf-8e2c-a64cd90ede15"),
IsActive = true
});
});
@@ -4092,6 +4102,85 @@ namespace Distribution.Migrations
});
});
modelBuilder.Entity("Distribution.Models.SupplierPayment", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<decimal>("Amount")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<Guid?>("FK_BankAccountId")
.HasColumnType("char(36)");
b.Property<Guid?>("FK_ChequePageId")
.HasColumnType("char(36)");
b.Property<Guid>("FK_SupplierId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
b.Property<int>("Method")
.HasColumnType("int");
b.Property<string>("Notes")
.HasColumnType("longtext");
b.Property<DateTime>("PaidAt")
.HasColumnType("datetime(6)");
b.Property<Guid?>("PaidByUserId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("FK_BankAccountId");
b.HasIndex("FK_ChequePageId");
b.HasIndex("FK_SupplierId");
b.ToTable("SupplierPayments");
});
modelBuilder.Entity("Distribution.Models.SupplierPaymentGRN", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<decimal>("AllocatedAmount")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<Guid>("FK_GoodsReceiptId")
.HasColumnType("char(36)");
b.Property<Guid>("FK_SupplierPaymentId")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
b.HasKey("Id");
b.HasIndex("FK_GoodsReceiptId");
b.HasIndex("FK_SupplierPaymentId");
b.ToTable("SupplierPaymentGRNs");
});
modelBuilder.Entity("Distribution.Models.SysConfig", b =>
{
b.Property<string>("Key")
@@ -4880,13 +4969,25 @@ namespace Distribution.Migrations
modelBuilder.Entity("Distribution.Models.Payment", b =>
{
b.HasOne("Distribution.Models.BankAccount", "BankAccount")
.WithMany()
.HasForeignKey("FK_BankAccountId");
b.HasOne("Distribution.Models.Invoice", "Invoice")
.WithMany("Payments")
.HasForeignKey("FK_InvoiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Distribution.Models.ReceivedCheque", "ReceivedCheque")
.WithMany()
.HasForeignKey("FK_ReceivedChequeId");
b.Navigation("BankAccount");
b.Navigation("Invoice");
b.Navigation("ReceivedCheque");
});
modelBuilder.Entity("Distribution.Models.PriceList", b =>
@@ -5361,6 +5462,50 @@ namespace Distribution.Migrations
b.Navigation("SupplierClaim");
});
modelBuilder.Entity("Distribution.Models.SupplierPayment", b =>
{
b.HasOne("Distribution.Models.BankAccount", "BankAccount")
.WithMany()
.HasForeignKey("FK_BankAccountId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Distribution.Models.ChequePage", "ChequePage")
.WithMany()
.HasForeignKey("FK_ChequePageId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("Distribution.Models.Supplier", "Supplier")
.WithMany()
.HasForeignKey("FK_SupplierId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("BankAccount");
b.Navigation("ChequePage");
b.Navigation("Supplier");
});
modelBuilder.Entity("Distribution.Models.SupplierPaymentGRN", b =>
{
b.HasOne("Distribution.Models.GoodsReceipt", "GoodsReceipt")
.WithMany()
.HasForeignKey("FK_GoodsReceiptId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Distribution.Models.SupplierPayment", "SupplierPayment")
.WithMany("Allocations")
.HasForeignKey("FK_SupplierPaymentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("GoodsReceipt");
b.Navigation("SupplierPayment");
});
modelBuilder.Entity("Distribution.Models.UomConversion", b =>
{
b.HasOne("Distribution.Models.Uom", "FromUom")
@@ -5550,6 +5695,11 @@ namespace Distribution.Migrations
{
b.Navigation("Items");
});
modelBuilder.Entity("Distribution.Models.SupplierPayment", b =>
{
b.Navigation("Allocations");
});
#pragma warning restore 612, 618
}
}