Store Stock Entry
This commit is contained in:
parent
8fd2d58c0f
commit
a3245a6e82
13 changed files with 744 additions and 86 deletions
|
|
@ -9747,15 +9747,15 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Store.Receipt",
|
||||
"tr": "Stok Girişi",
|
||||
"en": "Stock Receipt"
|
||||
"key": "App.Store.Exit",
|
||||
"tr": "Stok Çıkışı",
|
||||
"en": "Stock Exit"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Store.Issue",
|
||||
"tr": "Stok Çıkışı",
|
||||
"en": "Stock Issue"
|
||||
"key": "App.Store.ExitItem",
|
||||
"tr": "Stok Çıkışı Ürünleri",
|
||||
"en": "Stock Exit Items"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -9787,6 +9787,18 @@
|
|||
"tr": "Stok Hareket Ürünleri",
|
||||
"en": "Stock Movement Items"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Store.Entry",
|
||||
"tr": "Stok Girişi",
|
||||
"en": "Stock Entry"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Store.EntryItem",
|
||||
"tr": "Stok Girişi Ürünleri",
|
||||
"en": "Stock Entry Items"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Project.Definitions",
|
||||
|
|
|
|||
|
|
@ -2328,7 +2328,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Movement Item
|
||||
#region Movement Items
|
||||
listFormName = AppCodes.Store.MovementItem;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
|
|
@ -2431,6 +2431,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.MovementType), "Name", "Name"),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -2438,14 +2439,15 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ReferenceType",
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ReferenceTypeId",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReferenceType), "Id", "Name"),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -2626,5 +2628,476 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Movement Entry
|
||||
listFormName = AppCodes.Store.Entry;
|
||||
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.Movement)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = "\"IsDeleted\" = 'false' AND \"MovementType\" = 'Giriş'",
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Movement)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 400, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "MovementNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
|
||||
new EditingFormItemDto { Order = 2, DataField = "MovementType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.Disabled },
|
||||
new EditingFormItemDto { Order = 3, DataField = "MovementDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "ReferenceTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "ReferenceDocument", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() { FieldName = "MovementType", FieldDbType = DbType.String, Value = "Giriş", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "Items",
|
||||
Text ="Items",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Movement Entry 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 = "MovementNumber",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderDesc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "MovementType",
|
||||
Width = 100,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.MovementType), "Name", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Date,
|
||||
FieldName = "MovementDate",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
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.Guid,
|
||||
FieldName = "ReferenceTypeId",
|
||||
Width = 200,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ReferenceType), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "ReferenceDocument",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
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 = "Description",
|
||||
Width = 400,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Movement Entry Items
|
||||
listFormName = AppCodes.Store.EntryItem;
|
||||
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.MovementItem)),
|
||||
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.MovementItem)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "WarehouseId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "ZoneId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "LocationId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 6, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "LotNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "SerialNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "Items",
|
||||
Text ="Items",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Movement Entry Items 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 = "WarehouseId",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.WarehouseValues,
|
||||
CascadeEmptyFields = "ZoneId,LocationId"
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "ZoneId",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.ZoneValues,
|
||||
CascadeRelationField = "WarehouseId",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "WarehouseId",
|
||||
CascadeEmptyFields = "LocationId"
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "LocationId",
|
||||
Width = 150,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = LookupQueryValues.LocationValues,
|
||||
CascadeRelationField = "WarehouseId,ZoneId",
|
||||
CascadeFilterOperator="=",
|
||||
CascadeParentFields = "WarehouseId,ZoneId",
|
||||
}),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "MaterialId",
|
||||
Width = 200,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Material), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "Quantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
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 = "Uom",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "LotNumber",
|
||||
Width = 150,
|
||||
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 = "SerialNumber",
|
||||
Width = 150,
|
||||
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 = "Description",
|
||||
Width = 400,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Putaway ve Putaway Condition Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Store.Entry,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Store.EntryItem,
|
||||
Code = AppCodes.Store.EntryItem,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
DbType = DbType.Guid,
|
||||
ChildFieldName = "MovementId"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2699,22 +2699,22 @@
|
|||
},
|
||||
{
|
||||
"ParentCode": "App.Store",
|
||||
"Code": "App.Store.Receipt",
|
||||
"DisplayName": "App.Store.Receipt",
|
||||
"Code": "App.Store.Entry",
|
||||
"DisplayName": "App.Store.Entry",
|
||||
"Order": 10,
|
||||
"Url": "/admin/warehouse/receipt",
|
||||
"Url": "/admin/list/App.Store.Entry",
|
||||
"Icon": "FcImport",
|
||||
"RequiredPermissionName": "App.Store.Receipt",
|
||||
"RequiredPermissionName": "App.Store.Entry",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Store",
|
||||
"Code": "App.Store.Issue",
|
||||
"DisplayName": "App.Store.Issue",
|
||||
"Code": "App.Store.Exit",
|
||||
"DisplayName": "App.Store.Exit",
|
||||
"Order": 11,
|
||||
"Url": "/admin/warehouse/issue",
|
||||
"Icon": "FcExport",
|
||||
"RequiredPermissionName": "App.Store.Issue",
|
||||
"RequiredPermissionName": "App.Store.Exit",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8331,17 +8331,17 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Store.Receipt",
|
||||
"DisplayName": "App.Store.Entry",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Create",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Create",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8349,8 +8349,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Update",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Update",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8358,8 +8358,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Delete",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Delete",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8367,8 +8367,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Export",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Export",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8376,8 +8376,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Import",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Import",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8385,8 +8385,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Receipt.Note",
|
||||
"ParentName": "App.Store.Receipt",
|
||||
"Name": "App.Store.Entry.Note",
|
||||
"ParentName": "App.Store.Entry",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8394,17 +8394,17 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Store.Issue",
|
||||
"DisplayName": "App.Store.Entry",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Create",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Create",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8412,8 +8412,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Update",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Update",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8421,8 +8421,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Delete",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Delete",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8430,8 +8430,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Export",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Export",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8439,8 +8439,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Import",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Import",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -8448,8 +8448,134 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Issue.Note",
|
||||
"ParentName": "App.Store.Issue",
|
||||
"Name": "App.Store.EntryItem.Note",
|
||||
"ParentName": "App.Store.EntryItem",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Store.Exit",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Create",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Update",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Delete",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Export",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Import",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.Exit.Note",
|
||||
"ParentName": "App.Store.Exit",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Store.ExitItem",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Create",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Update",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Delete",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Export",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Import",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Store",
|
||||
"Name": "App.Store.ExitItem.Note",
|
||||
"ParentName": "App.Store.ExitItem",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
|
|||
|
|
@ -585,6 +585,12 @@ public static class SeedConsts
|
|||
public const string MovementType = Default + ".MovementType";
|
||||
public const string Movement = Default + ".Movement";
|
||||
public const string MovementItem = Default + ".MovementItem";
|
||||
public const string Entry = Default + ".Entry";
|
||||
public const string EntryItem = Default + ".EntryItem";
|
||||
public const string Exit = Default + ".Exit";
|
||||
public const string ExitItem = Default + ".ExitItem";
|
||||
public const string Transfer = Default + ".Transfer";
|
||||
public const string TransferItem = Default + ".TransferItem";
|
||||
}
|
||||
|
||||
public static class Project
|
||||
|
|
|
|||
|
|
@ -11,8 +11,12 @@ public class Movement : FullAuditedEntity<Guid>, IMultiTenant
|
|||
|
||||
public string MovementNumber { get; set; }
|
||||
public DateTime MovementDate { get; set; }
|
||||
|
||||
public string MovementType { get; set; } // e.g., Inbound, Outbound, Transfer
|
||||
public string ReferenceType { get; set; } // e.g., Sales Order, Purchase Order
|
||||
|
||||
public Guid? ReferenceTypeId { get; set; } // e.g., Sales Order, Purchase Order
|
||||
public ReferenceType? ReferenceType { get; set; }
|
||||
|
||||
public string ReferenceDocument { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -3819,7 +3819,7 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.MovementNumber).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.MovementDate).IsRequired();
|
||||
b.Property(x => x.MovementType).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.ReferenceType).HasMaxLength(100);
|
||||
b.Property(x => x.ReferenceTypeId).IsRequired();
|
||||
b.Property(x => x.ReferenceDocument).HasMaxLength(100);
|
||||
b.Property(x => x.Description).HasMaxLength(1000);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251206210148_Initial")]
|
||||
[Migration("20251207184859_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -7741,9 +7741,8 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("ReferenceType")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
b.Property<Guid>("ReferenceTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
|
|
@ -7751,6 +7750,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ReferenceTypeId");
|
||||
|
||||
b.ToTable("Str_T_Movement", (string)null);
|
||||
});
|
||||
|
||||
|
|
@ -19237,6 +19238,17 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Branch");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Movement", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.ReferenceType", "ReferenceType")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReferenceTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ReferenceType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MovementItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Location", "Location")
|
||||
|
|
@ -3048,31 +3048,6 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Str_T_LocationType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Str_T_Movement",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
MovementNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
MovementDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
MovementType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
ReferenceType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
ReferenceDocument = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, 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_Str_T_Movement", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Str_T_MovementType",
|
||||
columns: table => new
|
||||
|
|
@ -4474,6 +4449,37 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Str_T_Movement",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
MovementNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
MovementDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
MovementType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
ReferenceTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ReferenceDocument = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, 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_Str_T_Movement", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Str_T_Movement_Str_T_ReferenceType_ReferenceTypeId",
|
||||
column: x => x.ReferenceTypeId,
|
||||
principalTable: "Str_T_ReferenceType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AbpEntityPropertyChanges",
|
||||
columns: table => new
|
||||
|
|
@ -9270,6 +9276,11 @@ namespace Erp.Platform.Migrations
|
|||
table: "Str_T_Location",
|
||||
column: "ZoneId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Str_T_Movement_ReferenceTypeId",
|
||||
table: "Str_T_Movement",
|
||||
column: "ReferenceTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Str_T_MovementItem_LocationId",
|
||||
table: "Str_T_MovementItem",
|
||||
|
|
@ -9870,9 +9881,6 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Str_T_PutawayCondition");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Str_T_ReferenceType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AbpEntityChanges");
|
||||
|
||||
|
|
@ -10083,6 +10091,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Str_T_Zone");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Str_T_ReferenceType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_Branch");
|
||||
|
||||
|
|
@ -7738,9 +7738,8 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("ReferenceType")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
b.Property<Guid>("ReferenceTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
|
|
@ -7748,6 +7747,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ReferenceTypeId");
|
||||
|
||||
b.ToTable("Str_T_Movement", (string)null);
|
||||
});
|
||||
|
||||
|
|
@ -19234,6 +19235,17 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Branch");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Movement", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.ReferenceType", "ReferenceType")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReferenceTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ReferenceType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.MovementItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Location", "Location")
|
||||
|
|
|
|||
|
|
@ -6623,7 +6623,7 @@
|
|||
"zoneCode": "Z001",
|
||||
"locationCode": "A01-01-01",
|
||||
"quantity": 100,
|
||||
"uom": "adet",
|
||||
"uom": "Adet",
|
||||
"lotNumber": "LOT2024006",
|
||||
"serialNumber": null,
|
||||
"description": "2024 yılı son çeyrek 360° derece performans değerlendirmesi"
|
||||
|
|
@ -6635,7 +6635,7 @@
|
|||
"zoneCode": "Z002",
|
||||
"locationCode": "A01-01-02",
|
||||
"quantity": 20,
|
||||
"uom": "adet",
|
||||
"uom": "Adet",
|
||||
"lotNumber": "LOT2024001",
|
||||
"serialNumber": null,
|
||||
"description": "Satış siparişi için malzeme çıkışı"
|
||||
|
|
@ -6647,7 +6647,7 @@
|
|||
"zoneCode": "Z003",
|
||||
"locationCode": "B02-02-01",
|
||||
"quantity": 10,
|
||||
"uom": "metre",
|
||||
"uom": "m",
|
||||
"lotNumber": "LOT2024002",
|
||||
"serialNumber": null,
|
||||
"description": "Depo transferi"
|
||||
|
|
|
|||
|
|
@ -2801,12 +2801,14 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
if (exists)
|
||||
continue;
|
||||
|
||||
var referenceType = await _referenceTypeRepository.FirstOrDefaultAsync(x => x.Name == item.ReferenceType);
|
||||
|
||||
await _movementRepository.InsertAsync(new Movement
|
||||
{
|
||||
MovementNumber = item.MovementNumber,
|
||||
MovementDate = item.MovementDate,
|
||||
MovementType = item.MovementType,
|
||||
ReferenceType = item.ReferenceType,
|
||||
ReferenceTypeId = referenceType?.Id,
|
||||
ReferenceDocument = item.ReferenceDocument,
|
||||
Description = item.Description
|
||||
}, autoSave: true);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency
|
|||
m.MovementNumber,
|
||||
m.MovementDate,
|
||||
m.MovementType,
|
||||
m.ReferenceType,
|
||||
m.ReferenceTypeId,
|
||||
m.ReferenceDocument,
|
||||
m.Description AS MainDescription,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue