Accounting Wayybill Type ve Waybill Status
This commit is contained in:
parent
dec3be0559
commit
a2788c1d41
18 changed files with 1623 additions and 60 deletions
|
|
@ -10159,6 +10159,24 @@
|
|||
"tr": "Planlama Gantt",
|
||||
"en": "Planning Gantt"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.WaybillType",
|
||||
"tr": "İrsaliye Türleri",
|
||||
"en": "Waybill Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.Definitions",
|
||||
"tr": "Tanımlamalar",
|
||||
"en": "Definitions"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.WaybillStatus",
|
||||
"tr": "İrsaliye Durumları",
|
||||
"en": "Waybill Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Accounting.CurrentAccount",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -353,7 +354,8 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = true,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -518,7 +520,8 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -719,7 +722,8 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -1027,6 +1031,253 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Waybill Status
|
||||
listFormName = AppCodes.Accounting.WaybillStatus;
|
||||
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.WaybillStatus)),
|
||||
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.WaybillStatus)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region WaybillStatus 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.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 4,
|
||||
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.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Waybill Type
|
||||
listFormName = AppCodes.Accounting.WaybillType;
|
||||
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.WaybillType)),
|
||||
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.WaybillType)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region WaybillType 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.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 4,
|
||||
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.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3187,11 +3187,41 @@
|
|||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.Definitions",
|
||||
"DisplayName": "App.Accounting.Definitions",
|
||||
"Order": 1,
|
||||
"Url": null,
|
||||
"Icon": "FcFilingCabinet",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Accounting.Definitions",
|
||||
"Code": "App.Accounting.WaybillType",
|
||||
"DisplayName": "App.Accounting.WaybillType",
|
||||
"Order": 1,
|
||||
"Url": "/admin/list/App.Accounting.WaybillType",
|
||||
"Icon": "FcShare",
|
||||
"RequiredPermissionName": "App.Accounting.WaybillType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Accounting.Definitions",
|
||||
"Code": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "App.Accounting.WaybillStatus",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/App.Accounting.WaybillStatus",
|
||||
"Icon": "FcSwitch",
|
||||
"RequiredPermissionName": "App.Accounting.WaybillStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.Cash",
|
||||
"DisplayName": "App.Accounting.Cash",
|
||||
"Order": 1,
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/App.Accounting.Cash",
|
||||
"Icon": "FcCurrencyExchange",
|
||||
"RequiredPermissionName": "App.Accounting.Cash",
|
||||
|
|
@ -3201,7 +3231,7 @@
|
|||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.Bank",
|
||||
"DisplayName": "App.Accounting.Bank",
|
||||
"Order": 2,
|
||||
"Order": 3,
|
||||
"Url": "/admin/list/App.Accounting.Bank",
|
||||
"Icon": "FcHome",
|
||||
"RequiredPermissionName": "App.Accounting.Bank",
|
||||
|
|
@ -3211,7 +3241,7 @@
|
|||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.CurrentAccount",
|
||||
"DisplayName": "App.Accounting.CurrentAccount",
|
||||
"Order": 3,
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/App.Accounting.CurrentAccount",
|
||||
"Icon": "FcDebt",
|
||||
"RequiredPermissionName": "App.Accounting.CurrentAccount",
|
||||
|
|
@ -3221,7 +3251,7 @@
|
|||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.Waybill",
|
||||
"DisplayName": "App.Accounting.Waybill",
|
||||
"Order": 4,
|
||||
"Order": 5,
|
||||
"Url": "/admin/accounting/waybills",
|
||||
"Icon": "FcSurvey",
|
||||
"RequiredPermissionName": "App.Accounting.Waybill",
|
||||
|
|
@ -3231,7 +3261,7 @@
|
|||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.Invoice",
|
||||
"DisplayName": "App.Accounting.Invoice",
|
||||
"Order": 5,
|
||||
"Order": 6,
|
||||
"Url": "/admin/accounting/invoices",
|
||||
"Icon": "FcSalesPerformance",
|
||||
"RequiredPermissionName": "App.Accounting.Invoice",
|
||||
|
|
@ -3241,7 +3271,7 @@
|
|||
"ParentCode": "App.Accounting",
|
||||
"Code": "App.Accounting.CheckNote",
|
||||
"DisplayName": "App.Accounting.CheckNote",
|
||||
"Order": 6,
|
||||
"Order": 7,
|
||||
"Url": "/admin/accounting/check-note",
|
||||
"Icon": "FcInspection",
|
||||
"RequiredPermissionName": "App.Accounting.CheckNote",
|
||||
|
|
|
|||
|
|
@ -13180,6 +13180,132 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Accounting.WaybillType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Create",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Update",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Delete",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Export",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Import",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillType.Note",
|
||||
"ParentName": "App.Accounting.WaybillType",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Accounting.WaybillStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Create",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Update",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Delete",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Export",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Import",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.WaybillStatus.Note",
|
||||
"ParentName": "App.Accounting.WaybillStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Accounting",
|
||||
"Name": "App.Accounting.Waybill",
|
||||
|
|
|
|||
|
|
@ -218,4 +218,8 @@ public enum TableNameEnum
|
|||
MovementType,
|
||||
ReferenceType,
|
||||
TransferItem, //Gerçek bir tablo ismi değil. View eklemek amacıyla eklendi.
|
||||
WaybillType,
|
||||
WaybillStatus,
|
||||
Waybill,
|
||||
WaybillItem
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,10 +214,14 @@ public static class TableNameResolver
|
|||
|
||||
|
||||
// 🔹 ACCOUNTING
|
||||
{ nameof(TableNameEnum.Bank), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.BankAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.Cash), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.CurrentAccount), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.WaybillType), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.WaybillStatus), (TablePrefix.TenantByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.Bank), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.BankAccount), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.Cash), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.CurrentAccount), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.Waybill), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
{ nameof(TableNameEnum.WaybillItem), (TablePrefix.BranchByName, MenuPrefix.Accounting) },
|
||||
|
||||
// 🔹 STORE
|
||||
{ nameof(TableNameEnum.WarehouseType), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||
|
|
@ -282,7 +286,7 @@ public static class TableNameResolver
|
|||
|
||||
public static string GetFullSpecialViewName(MenuPrefix menu, string Prefix, string objectName)
|
||||
{
|
||||
return $"{ViewPrefix}{MenuPrefixExtensions.ToPrefix(menu)}_{Prefix}_{objectName}";
|
||||
return $"{ViewPrefix}{MenuPrefixExtensions.ToPrefix(menu)}_{Prefix}_{objectName}";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -567,6 +567,10 @@ public static class SeedConsts
|
|||
public const string BankAccount = Default + ".BankAccount";
|
||||
public const string Cash = Default + ".Cash";
|
||||
public const string CurrentAccount = Default + ".CurrentAccount";
|
||||
public const string WaybillType = Default + ".WaybillType";
|
||||
public const string WaybillStatus = Default + ".WaybillStatus";
|
||||
public const string Waybill = Default + ".Waybill";
|
||||
public const string WaybillItem = Default + ".WaybillItem";
|
||||
}
|
||||
|
||||
public static class Store
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class Waybill : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public string WaybillNumber { get; set; }
|
||||
public Guid WaybillTypeId { get; set; }
|
||||
public WaybillType WaybillType { get; set; }
|
||||
|
||||
public Guid CurrentAccountId { get; set; }
|
||||
public CurrentAccount CurrentAccount { get; set; }
|
||||
|
||||
public DateTime WaybillDate { get; set; }
|
||||
public DateTime? DeliveryDate { get; set; }
|
||||
|
||||
public double Subtotal { get; set; }
|
||||
public double TaxAmount { get; set; }
|
||||
public double DiscountAmount { get; set; }
|
||||
public double TotalAmount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
|
||||
public Guid WaybillStatusId { get; set; }
|
||||
public WaybillStatus WaybillStatus { get; set; }
|
||||
|
||||
public bool IsInvoiced { get; set; }
|
||||
public Guid? InvoiceId { get; set; }
|
||||
|
||||
public string DeliveryAddress { get; set; }
|
||||
public string ReceiverName { get; set; }
|
||||
public string ReceiverPhone { get; set; }
|
||||
public string CarrierCompany { get; set; }
|
||||
public string TrackingNumber { get; set; }
|
||||
public string Notes { get; set; }
|
||||
|
||||
public ICollection<WaybillItem> Items { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class WaybillItem : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? BranchId { get; set; }
|
||||
|
||||
public Guid WaybillId { get; set; }
|
||||
public Waybill Waybill { get; set; }
|
||||
|
||||
public Guid? MaterialId { get; set; }
|
||||
public Material Material { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public double Quantity { get; set; }
|
||||
public string Unit { get; set; }
|
||||
public double UnitPrice { get; set; }
|
||||
public double LineTotal { get; set; }
|
||||
|
||||
public double DiscountRate { get; set; }
|
||||
public double DiscountAmount { get; set; }
|
||||
|
||||
public double TaxRate { get; set; }
|
||||
public double TaxAmount { get; set; }
|
||||
public double NetAmount { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class WaybillStatus : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class WaybillType : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
|
@ -236,13 +236,6 @@ public class PlatformDbContext :
|
|||
public DbSet<SalesOrderStatus> SalesOrderStatuses { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Accounting
|
||||
public DbSet<Bank> Banks { get; set; }
|
||||
public DbSet<BankAccount> BankAccounts { get; set; }
|
||||
public DbSet<Cash> CashAccounts { get; set; }
|
||||
public DbSet<CurrentAccount> CurrentAccounts { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Store
|
||||
public DbSet<WarehouseType> WarehouseTypes { get; set; }
|
||||
public DbSet<Warehouse> Warehouses { get; set; }
|
||||
|
|
@ -300,6 +293,17 @@ public class PlatformDbContext :
|
|||
public DbSet<ProjectTaskDaily> ProjectTaskDailies { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Accounting
|
||||
public DbSet<Bank> Banks { get; set; }
|
||||
public DbSet<BankAccount> BankAccounts { get; set; }
|
||||
public DbSet<Cash> CashAccounts { get; set; }
|
||||
public DbSet<CurrentAccount> CurrentAccounts { get; set; }
|
||||
public DbSet<WaybillType> WaybillTypes { get; set; }
|
||||
public DbSet<WaybillStatus> WaybillStatuses { get; set; }
|
||||
public DbSet<Waybill> Waybills { get; set; }
|
||||
public DbSet<WaybillItem> WaybillItems { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
|
|
@ -3872,5 +3876,24 @@ public class PlatformDbContext :
|
|||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<WaybillStatus>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillStatus)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
});
|
||||
|
||||
builder.Entity<WaybillType>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WaybillType)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251208072106_Initial")]
|
||||
[Migration("20251208185357_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -1218,7 +1218,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_Bank", (string)null);
|
||||
b.ToTable("Acc_B_Bank", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BankAccount", b =>
|
||||
|
|
@ -1289,7 +1289,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("BankId");
|
||||
|
||||
b.ToTable("Acc_T_BankAccount", (string)null);
|
||||
b.ToTable("Acc_B_BankAccount", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Behavior", b =>
|
||||
|
|
@ -2074,7 +2074,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_Cash", (string)null);
|
||||
b.ToTable("Acc_B_Cash", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Category", b =>
|
||||
|
|
@ -3568,7 +3568,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("PaymentTermId");
|
||||
|
||||
b.ToTable("Acc_T_CurrentAccount", (string)null);
|
||||
b.ToTable("Acc_B_CurrentAccount", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.CustomComponent", b =>
|
||||
|
|
@ -14958,6 +14958,319 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Str_T_WarehouseType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("CarrierCompany")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("CurrentAccountId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("DeliveryAddress")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("DeliveryDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("DiscountAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("InvoiceId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<bool>("IsInvoiced")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ReceiverName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ReceiverPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Subtotal")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<double>("TotalAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("TrackingNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("WaybillDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("WaybillNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("WaybillStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WaybillTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CurrentAccountId");
|
||||
|
||||
b.HasIndex("WaybillStatusId");
|
||||
|
||||
b.HasIndex("WaybillTypeId");
|
||||
|
||||
b.ToTable("Waybills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("DiscountAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("DiscountRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<double>("LineTotal")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<double>("NetAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("Quantity")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Unit")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("UnitPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid>("WaybillId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("WaybillId");
|
||||
|
||||
b.ToTable("WaybillItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_WaybillStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_WaybillType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20268,6 +20581,50 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("WarehouseType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.CurrentAccount", "CurrentAccount")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WaybillStatus", "WaybillStatus")
|
||||
.WithMany()
|
||||
.HasForeignKey("WaybillStatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WaybillType", "WaybillType")
|
||||
.WithMany()
|
||||
.HasForeignKey("WaybillTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CurrentAccount");
|
||||
|
||||
b.Navigation("WaybillStatus");
|
||||
|
||||
b.Navigation("WaybillType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Waybill", "Waybill")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("WaybillId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Waybill");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Department", "Department")
|
||||
|
|
@ -21103,6 +21460,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Warehouses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b =>
|
||||
{
|
||||
b.Navigation("Operations");
|
||||
|
|
@ -435,7 +435,7 @@ namespace Erp.Platform.Migrations
|
|||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_Bank",
|
||||
name: "Acc_B_Bank",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
|
|
@ -461,11 +461,11 @@ namespace Erp.Platform.Migrations
|
|||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_Bank", x => x.Id);
|
||||
table.PrimaryKey("PK_Acc_B_Bank", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_Cash",
|
||||
name: "Acc_B_Cash",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
|
|
@ -487,7 +487,51 @@ namespace Erp.Platform.Migrations
|
|||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_Cash", x => x.Id);
|
||||
table.PrimaryKey("PK_Acc_B_Cash", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_WaybillStatus",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_WaybillStatus", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_WaybillType",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_WaybillType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
|
|
@ -3402,7 +3446,7 @@ namespace Erp.Platform.Migrations
|
|||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_BankAccount",
|
||||
name: "Acc_B_BankAccount",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
|
|
@ -3423,11 +3467,11 @@ namespace Erp.Platform.Migrations
|
|||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_BankAccount", x => x.Id);
|
||||
table.PrimaryKey("PK_Acc_B_BankAccount", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Acc_T_BankAccount_Acc_T_Bank_BankId",
|
||||
name: "FK_Acc_B_BankAccount_Acc_B_Bank_BankId",
|
||||
column: x => x.BankId,
|
||||
principalTable: "Acc_T_Bank",
|
||||
principalTable: "Acc_B_Bank",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
|
@ -5060,7 +5104,7 @@ namespace Erp.Platform.Migrations
|
|||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Acc_T_CurrentAccount",
|
||||
name: "Acc_B_CurrentAccount",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
|
|
@ -5088,14 +5132,114 @@ namespace Erp.Platform.Migrations
|
|||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Acc_T_CurrentAccount", x => x.Id);
|
||||
table.PrimaryKey("PK_Acc_B_CurrentAccount", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Acc_T_CurrentAccount_Scp_T_PaymentTerm_PaymentTermId",
|
||||
name: "FK_Acc_B_CurrentAccount_Scp_T_PaymentTerm_PaymentTermId",
|
||||
column: x => x.PaymentTermId,
|
||||
principalTable: "Scp_T_PaymentTerm",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Waybills",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WaybillNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WaybillTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
CurrentAccountId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
WaybillDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DeliveryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Subtotal = table.Column<double>(type: "float", nullable: false),
|
||||
TaxAmount = table.Column<double>(type: "float", nullable: false),
|
||||
DiscountAmount = table.Column<double>(type: "float", nullable: false),
|
||||
TotalAmount = table.Column<double>(type: "float", nullable: false),
|
||||
Currency = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WaybillStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IsInvoiced = table.Column<bool>(type: "bit", nullable: false),
|
||||
InvoiceId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeliveryAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ReceiverName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ReceiverPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CarrierCompany = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TrackingNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Notes = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Waybills", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Waybills_Acc_B_CurrentAccount_CurrentAccountId",
|
||||
column: x => x.CurrentAccountId,
|
||||
principalTable: "Acc_B_CurrentAccount",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Waybills_Acc_T_WaybillStatus_WaybillStatusId",
|
||||
column: x => x.WaybillStatusId,
|
||||
principalTable: "Acc_T_WaybillStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Waybills_Acc_T_WaybillType_WaybillTypeId",
|
||||
column: x => x.WaybillTypeId,
|
||||
principalTable: "Acc_T_WaybillType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WaybillItems",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WaybillId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Quantity = table.Column<double>(type: "float", nullable: false),
|
||||
Unit = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
UnitPrice = table.Column<double>(type: "float", nullable: false),
|
||||
LineTotal = table.Column<double>(type: "float", nullable: false),
|
||||
DiscountRate = table.Column<double>(type: "float", nullable: false),
|
||||
DiscountAmount = table.Column<double>(type: "float", nullable: false),
|
||||
TaxRate = table.Column<double>(type: "float", nullable: false),
|
||||
TaxAmount = table.Column<double>(type: "float", nullable: false),
|
||||
NetAmount = table.Column<double>(type: "float", nullable: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WaybillItems", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_WaybillItems_Scp_T_Material_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Scp_T_Material",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_WaybillItems_Waybills_WaybillId",
|
||||
column: x => x.WaybillId,
|
||||
principalTable: "Waybills",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Adm_T_BlogPost",
|
||||
columns: table => new
|
||||
|
|
@ -5877,9 +6021,9 @@ namespace Erp.Platform.Migrations
|
|||
{
|
||||
table.PrimaryKey("PK_Hr_T_Employee", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Hr_T_Employee_Acc_T_Bank_BankId",
|
||||
name: "FK_Hr_T_Employee_Acc_B_Bank_BankId",
|
||||
column: x => x.BankId,
|
||||
principalTable: "Acc_T_Bank",
|
||||
principalTable: "Acc_B_Bank",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
|
|
@ -8042,18 +8186,18 @@ namespace Erp.Platform.Migrations
|
|||
column: "UserName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Acc_T_BankAccount_BankId",
|
||||
table: "Acc_T_BankAccount",
|
||||
name: "IX_Acc_B_BankAccount_BankId",
|
||||
table: "Acc_B_BankAccount",
|
||||
column: "BankId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Acc_T_CurrentAccount_PartnerId",
|
||||
table: "Acc_T_CurrentAccount",
|
||||
name: "IX_Acc_B_CurrentAccount_PartnerId",
|
||||
table: "Acc_B_CurrentAccount",
|
||||
column: "PartnerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Acc_T_CurrentAccount_PaymentTermId",
|
||||
table: "Acc_T_CurrentAccount",
|
||||
name: "IX_Acc_B_CurrentAccount_PaymentTermId",
|
||||
table: "Acc_B_CurrentAccount",
|
||||
column: "PaymentTermId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
|
|
@ -9344,9 +9488,34 @@ namespace Erp.Platform.Migrations
|
|||
table: "Str_T_Zone",
|
||||
column: "ZoneTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WaybillItems_MaterialId",
|
||||
table: "WaybillItems",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WaybillItems_WaybillId",
|
||||
table: "WaybillItems",
|
||||
column: "WaybillId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Waybills_CurrentAccountId",
|
||||
table: "Waybills",
|
||||
column: "CurrentAccountId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Waybills_WaybillStatusId",
|
||||
table: "Waybills",
|
||||
column: "WaybillStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Waybills_WaybillTypeId",
|
||||
table: "Waybills",
|
||||
column: "WaybillTypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Acc_T_CurrentAccount_Adm_T_Partner_PartnerId",
|
||||
table: "Acc_T_CurrentAccount",
|
||||
name: "FK_Acc_B_CurrentAccount_Adm_T_Partner_PartnerId",
|
||||
table: "Acc_B_CurrentAccount",
|
||||
column: "PartnerId",
|
||||
principalTable: "Adm_T_Partner",
|
||||
principalColumn: "Id");
|
||||
|
|
@ -9425,7 +9594,7 @@ namespace Erp.Platform.Migrations
|
|||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Hr_T_Employee_Acc_T_Bank_BankId",
|
||||
name: "FK_Hr_T_Employee_Acc_B_Bank_BankId",
|
||||
table: "Hr_T_Employee");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
|
|
@ -9529,13 +9698,10 @@ namespace Erp.Platform.Migrations
|
|||
name: "AbpUserTokens");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_BankAccount");
|
||||
name: "Acc_B_BankAccount");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_Cash");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_CurrentAccount");
|
||||
name: "Acc_B_Cash");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_About");
|
||||
|
|
@ -9894,6 +10060,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Str_T_PutawayCondition");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WaybillItems");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AbpEntityChanges");
|
||||
|
||||
|
|
@ -10026,6 +10195,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Str_T_Putaway");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Waybills");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AbpAuditLogs");
|
||||
|
||||
|
|
@ -10107,6 +10279,15 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Str_T_ReferenceType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_B_CurrentAccount");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_WaybillStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_WaybillType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_Branch");
|
||||
|
||||
|
|
@ -10147,7 +10328,7 @@ namespace Erp.Platform.Migrations
|
|||
name: "Str_T_WarehouseType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Acc_T_Bank");
|
||||
name: "Acc_B_Bank");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Adm_T_Partner");
|
||||
|
|
@ -1215,7 +1215,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_Bank", (string)null);
|
||||
b.ToTable("Acc_B_Bank", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.BankAccount", b =>
|
||||
|
|
@ -1286,7 +1286,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("BankId");
|
||||
|
||||
b.ToTable("Acc_T_BankAccount", (string)null);
|
||||
b.ToTable("Acc_B_BankAccount", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Behavior", b =>
|
||||
|
|
@ -2071,7 +2071,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_Cash", (string)null);
|
||||
b.ToTable("Acc_B_Cash", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Category", b =>
|
||||
|
|
@ -3565,7 +3565,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("PaymentTermId");
|
||||
|
||||
b.ToTable("Acc_T_CurrentAccount", (string)null);
|
||||
b.ToTable("Acc_B_CurrentAccount", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.CustomComponent", b =>
|
||||
|
|
@ -14955,6 +14955,319 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Str_T_WarehouseType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("CarrierCompany")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("CurrentAccountId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("DeliveryAddress")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("DeliveryDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("DiscountAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("InvoiceId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<bool>("IsInvoiced")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Notes")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ReceiverName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ReceiverPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Subtotal")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<double>("TotalAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("TrackingNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("WaybillDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("WaybillNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<Guid>("WaybillStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WaybillTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CurrentAccountId");
|
||||
|
||||
b.HasIndex("WaybillStatusId");
|
||||
|
||||
b.HasIndex("WaybillTypeId");
|
||||
|
||||
b.ToTable("Waybills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("BranchId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("DiscountAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("DiscountRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<double>("LineTotal")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<double>("NetAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("Quantity")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxAmount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("TaxRate")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Unit")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("UnitPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<Guid>("WaybillId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("WaybillId");
|
||||
|
||||
b.ToTable("WaybillItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_WaybillStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Acc_T_WaybillType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WorkHour", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20265,6 +20578,50 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("WarehouseType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.CurrentAccount", "CurrentAccount")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WaybillStatus", "WaybillStatus")
|
||||
.WithMany()
|
||||
.HasForeignKey("WaybillStatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WaybillType", "WaybillType")
|
||||
.WithMany()
|
||||
.HasForeignKey("WaybillTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CurrentAccount");
|
||||
|
||||
b.Navigation("WaybillStatus");
|
||||
|
||||
b.Navigation("WaybillType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WaybillItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany()
|
||||
.HasForeignKey("MaterialId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Waybill", "Waybill")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("WaybillId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Waybill");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Department", "Department")
|
||||
|
|
@ -21100,6 +21457,11 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Warehouses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Waybill", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Workcenter", b =>
|
||||
{
|
||||
b.Navigation("Operations");
|
||||
|
|
|
|||
|
|
@ -6688,5 +6688,49 @@
|
|||
"serialNumber": null,
|
||||
"description": "Depo transferi"
|
||||
}
|
||||
],
|
||||
"WaybillStatuses": [
|
||||
{
|
||||
"name": "Taslak",
|
||||
"description": "Taslak aşamasında",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Onaylandı",
|
||||
"description": "Onaylanmış durumda",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Teslim Edildi",
|
||||
"description": "Teslim edilmiş durumda",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İptal",
|
||||
"description": "İptal edilmiş durumda",
|
||||
"isActive": true
|
||||
}
|
||||
],
|
||||
"WaybillTypes": [
|
||||
{
|
||||
"name": "Çıkış İrsaliyesi",
|
||||
"description": "Malzeme çıkışları için kullanılan irsaliye türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Giriş İrsaliyesi",
|
||||
"description": "Malzeme girişleri için kullanılan irsaliye türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Transfer İrsaliyesi",
|
||||
"description": "Malzeme transferleri için kullanılan irsaliye türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İade İrsaliyesi",
|
||||
"description": "Malzeme iadeleri için kullanılan irsaliye türü",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -147,6 +147,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<ReferenceType, Guid> _referenceTypeRepository;
|
||||
private readonly IRepository<Movement, Guid> _movementRepository;
|
||||
private readonly IRepository<MovementItem, Guid> _movementItemRepository;
|
||||
private readonly IRepository<WaybillStatus, Guid> _waybillStatusRepository;
|
||||
private readonly IRepository<WaybillType, Guid> _waybillTypeRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IClock clock,
|
||||
|
|
@ -275,7 +277,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<MovementType, Guid> movementTypeRepository,
|
||||
IRepository<ReferenceType, Guid> referenceTypeRepository,
|
||||
IRepository<Movement, Guid> movementRepository,
|
||||
IRepository<MovementItem, Guid> movementItemRepository
|
||||
IRepository<MovementItem, Guid> movementItemRepository,
|
||||
IRepository<WaybillStatus, Guid> waybillStatusRepository,
|
||||
IRepository<WaybillType, Guid> waybillTypeRepository
|
||||
)
|
||||
{
|
||||
_clock = clock;
|
||||
|
|
@ -406,6 +410,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_referenceTypeRepository = referenceTypeRepository;
|
||||
_movementRepository = movementRepository;
|
||||
_movementItemRepository = movementItemRepository;
|
||||
_waybillStatusRepository = waybillStatusRepository;
|
||||
_waybillTypeRepository = waybillTypeRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -2844,6 +2850,34 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
Description = item.Description
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.WaybillStatuses)
|
||||
{
|
||||
var exists = await _waybillStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _waybillStatusRepository.InsertAsync(new WaybillStatus
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.WaybillTypes)
|
||||
{
|
||||
var exists = await _waybillTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _waybillTypeRepository.InsertAsync(new WaybillType
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,6 +147,24 @@ public class TenantSeederDto
|
|||
public List<ReferenceTypeSeedDto> ReferenceTypes { get; set; }
|
||||
public List<MovementSeedDto> Movements { get; set; }
|
||||
public List<MovementItemSeedDto> MovementItems { get; set; }
|
||||
|
||||
//Accounting
|
||||
public List<WaybillTypeSeedDto> WaybillTypes { get; set; }
|
||||
public List<WaybillStatusSeedDto> WaybillStatuses { get; set; }
|
||||
}
|
||||
|
||||
public class WaybillTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class WaybillStatusSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class MovementSeedDto
|
||||
|
|
|
|||
Loading…
Reference in a new issue