diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index a8a51295..bde94c88 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -10234,8 +10234,8 @@ { "resourceName": "Platform", "key": "App.Accounting.CheckNote", - "tr": "Çek & Senet", - "en": "Check & Notes" + "tr": "Çek", + "en": "Check" }, { "resourceName": "Platform", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index f8cd353d..a0b5484c 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -16,6 +16,7 @@ using Volo.Abp.Identity; using AppCodes = Erp.Platform.Data.Seeds.SeedConsts.AppCodes; using static Erp.Platform.PlatformConsts; using static Erp.Platform.PlatformSeeder.SeederDefaults; +using System.Linq; namespace Erp.Platform.Data.Seeds; @@ -1893,6 +1894,355 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende } #endregion + #region Check Note + listFormName = AppCodes.Accounting.CheckNote; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson(), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.CheckNote)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CheckNote)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 600, true, true, true, true, false), + EditingFormJson = JsonSerializer.Serialize(new List() { + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "TypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "StatusId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "CheckNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "BankName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "BranchName", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "AccountNumber", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 8, DataField = "DrawerName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, //Keşideci + new EditingFormItemDto { Order = 9, DataField = "PayeeName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, //Lehdar + new EditingFormItemDto { Order = 10, DataField = "CurrentAccountId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 11, DataField = "IssueDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat }, + new EditingFormItemDto { Order = 12, DataField = "DueDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat }, + new EditingFormItemDto { Order = 13, DataField = "Amount", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 14, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 15, DataField = "Notes", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea, EditorOptions=EditorOptionValues.ShowClearButton }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Amount", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "IssueDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { FieldName = "DueDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + }), + CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { + new() { + Hint = "Tahsil Et", + Text ="Tahsil Et", + UrlTarget="_blank", + AuthName = listFormName, + Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", + IsVisible = true, + VisibleExpression = "(e) => e.row.data.CollectionDate == null" + }, + new() { + Hint = "Ciro Et", + Text ="Ciro Et", + UrlTarget="_blank", + AuthName = listFormName, + Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", + IsVisible = true, + VisibleExpression = "(e) => e.row.data.EndorsedTo == null" + }, + }), + }, autoSave: true + ); + + #region Check Note Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "BranchId", + Width = 150, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.BranchValues, + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "TypeId", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CheckType), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "StatusId", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CheckStatus), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "CheckNumber", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "BankName", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "BranchName", + Width = 100, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "AccountNumber", + Width = 100, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DrawerName", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "PayeeName", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "CurrentAccountId", + Width = 150, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Date, + FieldName = "IssueDate", + Width = 150, + ListOrderNo = 12, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Date, + FieldName = "DueDate", + Width = 150, + ListOrderNo = 13, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Decimal, + FieldName = "Amount", + Format = "fixedPoint", + Alignment = "right", + Width = 150, + ListOrderNo = 14, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.CurrentAccount), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Currency", + Width = 150, + ListOrderNo = 15, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Notes", + Width = 150, + ListOrderNo = 16, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ], autoSave: true); + #endregion + } + #endregion + } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json index a22ae1c1..2e49cdd4 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json @@ -3322,7 +3322,7 @@ "Code": "App.Accounting.CheckNote", "DisplayName": "App.Accounting.CheckNote", "Order": 7, - "Url": "/admin/accounting/check-note", + "Url": "/admin/list/App.Accounting.CheckNote", "Icon": "FcInspection", "RequiredPermissionName": "App.Accounting.CheckNote", "IsDisabled": false diff --git a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs index a59c6e20..fa7ed521 100644 --- a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs @@ -576,6 +576,7 @@ public static class SeedConsts public const string PaymentStatus = Default + ".PaymentStatus"; public const string CheckStatus = Default + ".CheckStatus"; public const string CheckType = Default + ".CheckType"; + public const string CheckNote = Default + ".CheckNote"; } public static class Store diff --git a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs index e53d482e..85be93f3 100644 --- a/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs +++ b/api/src/Erp.Platform.Domain/Entities/Branch/Accounting/CheckNote.cs @@ -9,32 +9,31 @@ public class CheckNote : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public Guid? BranchId { get; set; } - public string CheckNumber { get; set; } - public string BankName { get; set; } - public string BranchName { get; set; } - public string AccountNumber { get; set; } - - public string DrawerName { get; set; } - public string PayeeName { get; set; } - - public Guid CurrentAccountId { get; set; } - public CurrentAccount CurrentAccount { get; set; } - - public DateTime IssueDate { get; set; } - public DateTime DueDate { get; set; } - - public decimal Amount { get; set; } - public string Currency { get; set; } + public Guid TypeId { get; set; } + public CheckType Type { get; set; } public Guid StatusId { get; set; } public CheckStatus Status { get; set; } - public Guid TypeId { get; set; } - public CheckType Type { get; set; } + public string CheckNumber { get; set; } + public string BankName { get; set; } + public string BranchName { get; set; } + public string AccountNumber { get; set; } + public string DrawerName { get; set; } //Keşideci + public string PayeeName { get; set; } //Lehdar - public DateTime? BankingDate { get; set; } - public DateTime? CollectionDate { get; set; } + public Guid? CurrentAccountId { get; set; } + public CurrentAccount? CurrentAccount { get; set; } - public string EndorsedTo { get; set; } - public string Notes { get; set; } + public DateTime IssueDate { get; set; } //Düzenleme Tarihi + public DateTime DueDate { get; set; } //Vade Tarihi + + public decimal Amount { get; set; } + public string Currency { get; set; } + + public DateTime? BankingDate { get; set; } //Bankaya Verilme Tarihi + public DateTime? CollectionDate { get; set; } //Tahsil Tarihi + public string EndorsedTo { get; set; } //Ciro Edilen Kişi + + public string Notes { get; set; } //Açıklamalar } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index c78854fa..cf1490a2 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -4133,7 +4133,8 @@ public class PlatformDbContext : b.HasOne(x => x.CurrentAccount) .WithMany(ca => ca.Checks) .HasForeignKey(x => x.CurrentAccountId) - .OnDelete(DeleteBehavior.Restrict); + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(false); b.HasOne(x => x.Status) .WithMany(ca => ca.Checks) diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.Designer.cs index 7617e72e..a147afaf 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251208215226_Initial")] + [Migration("20251209191500_Initial")] partial class Initial { /// @@ -2252,7 +2252,7 @@ namespace Erp.Platform.Migrations .HasMaxLength(10) .HasColumnType("nvarchar(10)"); - b.Property("CurrentAccountId") + b.Property("CurrentAccountId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -19768,8 +19768,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.CurrentAccount", "CurrentAccount") .WithMany("Checks") .HasForeignKey("CurrentAccountId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.CheckStatus", "Status") .WithMany("Checks") diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.cs index 8963ff57..3a96f6aa 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251208215226_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251209191500_Initial.cs @@ -5220,19 +5220,19 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), BranchId = table.Column(type: "uniqueidentifier", nullable: true), + TypeId = table.Column(type: "uniqueidentifier", nullable: false), + StatusId = table.Column(type: "uniqueidentifier", nullable: false), CheckNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), BankName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), BranchName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), AccountNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), DrawerName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), PayeeName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: false), + CurrentAccountId = table.Column(type: "uniqueidentifier", nullable: true), IssueDate = table.Column(type: "datetime2", nullable: false), DueDate = table.Column(type: "datetime2", nullable: false), Amount = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), Currency = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - StatusId = table.Column(type: "uniqueidentifier", nullable: false), - TypeId = table.Column(type: "uniqueidentifier", nullable: false), BankingDate = table.Column(type: "datetime2", nullable: true), CollectionDate = table.Column(type: "datetime2", nullable: true), EndorsedTo = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 0c671c11..201f6cec 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -2249,7 +2249,7 @@ namespace Erp.Platform.Migrations .HasMaxLength(10) .HasColumnType("nvarchar(10)"); - b.Property("CurrentAccountId") + b.Property("CurrentAccountId") .HasColumnType("uniqueidentifier"); b.Property("DeleterId") @@ -19765,8 +19765,7 @@ namespace Erp.Platform.Migrations b.HasOne("Erp.Platform.Entities.CurrentAccount", "CurrentAccount") .WithMany("Checks") .HasForeignKey("CurrentAccountId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + .OnDelete(DeleteBehavior.Restrict); b.HasOne("Erp.Platform.Entities.CheckStatus", "Status") .WithMany("Checks")