ListFormSeeder SupplyChain
This commit is contained in:
parent
8e86f6fb83
commit
8f14f259ca
23 changed files with 2028 additions and 74 deletions
|
|
@ -9439,6 +9439,12 @@
|
||||||
"tr": "Teklif Durumları",
|
"tr": "Teklif Durumları",
|
||||||
"en": "Quotation Status"
|
"en": "Quotation Status"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.SupplyChain.OrderStatus",
|
||||||
|
"tr": "Sipariş Durumları",
|
||||||
|
"en": "Order Status"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.SupplyChain.MaterialType",
|
"key": "App.SupplyChain.MaterialType",
|
||||||
|
|
@ -9537,10 +9543,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.SupplyChain.Order",
|
"key": "App.SupplyChain.PurchaseOrder",
|
||||||
"tr": "Siparişler",
|
"tr": "Siparişler",
|
||||||
"en": "Orders"
|
"en": "Orders"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"tr": "Sipariş Ürünleri",
|
||||||
|
"en": "Order Items"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.SupplyChain.Delivery",
|
"key": "App.SupplyChain.Delivery",
|
||||||
|
|
|
||||||
|
|
@ -2080,7 +2080,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
|
||||||
ExportJson = DefaultExportJson,
|
ExportJson = DefaultExportJson,
|
||||||
IsSubForm = false,
|
IsSubForm = false,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson(),
|
LayoutJson = DefaultLayoutJson("gantt"),
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
ListFormCode = listFormName,
|
ListFormCode = listFormName,
|
||||||
Name = listFormName,
|
Name = listFormName,
|
||||||
|
|
|
||||||
|
|
@ -4357,5 +4357,687 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#region Order Status
|
||||||
|
listFormName = AppCodes.SupplyChain.OrderStatus;
|
||||||
|
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.OrderStatus)),
|
||||||
|
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.OrderStatus)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false),
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
|
{
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
|
]}
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Payment Term 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,
|
||||||
|
SortIndex = 0,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Name",
|
||||||
|
Width = 300,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
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 = "Description",
|
||||||
|
Width = 500,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
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 = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Purchase Order
|
||||||
|
listFormName = AppCodes.SupplyChain.PurchaseOrder;
|
||||||
|
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.PurchaseOrder)),
|
||||||
|
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.PurchaseOrder)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false),
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
|
{
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField="OrderNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField="SupplierId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField="OrderDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField="PaymentTermId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField="RequestId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 6, DataField="QuotationId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 7, DataField="Terms", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
|
new EditingFormItemDto { Order = 8, DataField="Notes", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
|
new EditingFormItemDto { Order = 9, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 10, DataField="ExchangeRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 11, DataField="Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
]}
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "OrderNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "OrderDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
|
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
}),
|
||||||
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
|
new() {
|
||||||
|
Hint = "Manage",
|
||||||
|
Text ="Manage",
|
||||||
|
UrlTarget="_blank",
|
||||||
|
AuthName = listFormName,
|
||||||
|
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||||
|
IsVisible=true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Purchase Order 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,
|
||||||
|
SortIndex = 0,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "OrderNumber",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
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 = "SupplierId",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.SupplierValues
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.DateTime,
|
||||||
|
FieldName = "OrderDate",
|
||||||
|
Width = 130,
|
||||||
|
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.DateTime,
|
||||||
|
FieldName = "DeliveryDate",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "PaymentTermId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.PaymentTerm), "Id", "Name"),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "RequestId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Request), "Id", "RequestNumber"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "QuotationId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Quotation), "Id", "QuotationNumber"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Terms",
|
||||||
|
Width = 300,
|
||||||
|
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 = "Notes",
|
||||||
|
Width = 300,
|
||||||
|
ListOrderNo = 10,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Currency",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 11,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Decimal,
|
||||||
|
FieldName = "ExchangeRate",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 12,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
EditorOptions = EditorOptionValues.NumberStandartFormat
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Decimal,
|
||||||
|
FieldName = "Subtotal",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 13,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
EditorOptions = EditorOptionValues.NumberStandartFormat
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Decimal,
|
||||||
|
FieldName = "TaxAmount",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 14,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
EditorOptions = EditorOptionValues.NumberStandartFormat
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Decimal,
|
||||||
|
FieldName = "TotalAmount",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 15,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
EditorOptions = EditorOptionValues.NumberStandartFormat
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Status",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 16,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.OrderStatus), "Name", "Name"),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
], autoSave: true);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Purchase Order Item
|
||||||
|
listFormName = AppCodes.SupplyChain.PurchaseOrderItem;
|
||||||
|
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.PurchaseOrderItem)),
|
||||||
|
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.PurchaseOrderItem)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false),
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
|
{
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||||
|
new EditingFormItemDto { Order = 1, DataField="MaterialId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField="UnitPrice", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField="Quantity", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField="Uom", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField="TotalPrice", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 6, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
|
]}
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "UnitPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "TotalPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Purchase Order Item 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,
|
||||||
|
SortIndex = 0,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "MaterialId",
|
||||||
|
Width = 300,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
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 = "UnitPrice",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
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.Decimal,
|
||||||
|
FieldName = "Quantity",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
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.String,
|
||||||
|
FieldName = "Uom",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
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.Decimal,
|
||||||
|
FieldName = "TotalPrice",
|
||||||
|
Format = "fixedPoint",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Description",
|
||||||
|
Width = 500,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
], autoSave: true);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Purchase Order ve Purchase Order Item arasında SubForm ilişki kurulması
|
||||||
|
await utils.CloneFormLayoutAsync(
|
||||||
|
AppCodes.SupplyChain.PurchaseOrder,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
TabTitle = AppCodes.SupplyChain.PurchaseOrderItem,
|
||||||
|
Code = AppCodes.SupplyChain.PurchaseOrderItem,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PurchaseOrderId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2378,6 +2378,16 @@
|
||||||
"RequiredPermissionName": "App.SupplyChain.QuotationStatus",
|
"RequiredPermissionName": "App.SupplyChain.QuotationStatus",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ParentCode": "App.SupplyChain.Definitions",
|
||||||
|
"Code": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "App.SupplyChain.OrderStatus",
|
||||||
|
"Order": 12,
|
||||||
|
"Url": "/admin/list/App.SupplyChain.OrderStatus",
|
||||||
|
"Icon": "FcGraduationCap",
|
||||||
|
"RequiredPermissionName": "App.SupplyChain.OrderStatus",
|
||||||
|
"IsDisabled": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.SupplyChain",
|
"ParentCode": "App.SupplyChain",
|
||||||
"Code": "App.SupplyChain.Request",
|
"Code": "App.SupplyChain.Request",
|
||||||
|
|
@ -2400,12 +2410,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.SupplyChain",
|
"ParentCode": "App.SupplyChain",
|
||||||
"Code": "App.SupplyChain.Order",
|
"Code": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "App.SupplyChain.Order",
|
"DisplayName": "App.SupplyChain.PurchaseOrder",
|
||||||
"Order": 4,
|
"Order": 4,
|
||||||
"Url": "/admin/supplychain/orders",
|
"Url": "/admin/list/App.SupplyChain.PurchaseOrder",
|
||||||
"Icon": "FcShop",
|
"Icon": "FcShop",
|
||||||
"RequiredPermissionName": "App.SupplyChain.Order",
|
"RequiredPermissionName": "App.SupplyChain.PurchaseOrder",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6097,6 +6097,89 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.QuotationStatus.Import",
|
||||||
|
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.QuotationStatus.Note",
|
||||||
|
"ParentName": "App.SupplyChain.QuotationStatus",
|
||||||
|
"DisplayName": "Note",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.SupplyChain.OrderStatus",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Create",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Update",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Delete",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Export",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Import",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.OrderStatus.Note",
|
||||||
|
"ParentName": "App.SupplyChain.OrderStatus",
|
||||||
|
"DisplayName": "Note",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Material",
|
"Name": "App.SupplyChain.Material",
|
||||||
|
|
@ -6666,17 +6749,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order",
|
"Name": "App.SupplyChain.PurchaseOrder",
|
||||||
"ParentName": null,
|
"ParentName": null,
|
||||||
"DisplayName": "App.SupplyChain.Order",
|
"DisplayName": "App.SupplyChain.PurchaseOrder",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Create",
|
"Name": "App.SupplyChain.PurchaseOrder.Create",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Create",
|
"DisplayName": "Create",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -6684,8 +6767,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Update",
|
"Name": "App.SupplyChain.PurchaseOrder.Update",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Update",
|
"DisplayName": "Update",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -6693,8 +6776,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Delete",
|
"Name": "App.SupplyChain.PurchaseOrder.Delete",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Delete",
|
"DisplayName": "Delete",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -6702,8 +6785,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Export",
|
"Name": "App.SupplyChain.PurchaseOrder.Export",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Export",
|
"DisplayName": "Export",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -6711,8 +6794,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Import",
|
"Name": "App.SupplyChain.PurchaseOrder.Import",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Import",
|
"DisplayName": "Import",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
|
|
@ -6720,13 +6803,78 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Order.Note",
|
"Name": "App.SupplyChain.PurchaseOrder.Note",
|
||||||
"ParentName": "App.SupplyChain.Order",
|
"ParentName": "App.SupplyChain.PurchaseOrder",
|
||||||
"DisplayName": "Note",
|
"DisplayName": "Note",
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Create",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Update",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Delete",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Export",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Import",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.SupplyChain",
|
||||||
|
"Name": "App.SupplyChain.PurchaseOrderItem.Note",
|
||||||
|
"ParentName": "App.SupplyChain.PurchaseOrderItem",
|
||||||
|
"DisplayName": "Note",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.SupplyChain",
|
"GroupName": "App.SupplyChain",
|
||||||
"Name": "App.SupplyChain.Delivery",
|
"Name": "App.SupplyChain.Delivery",
|
||||||
|
|
@ -7357,7 +7505,7 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.Maintenance",
|
"GroupName": "App.Maintenance",
|
||||||
"Name": "App.Maintenance.Workorder",
|
"Name": "App.Maintenance.Workorder",
|
||||||
|
|
@ -13221,4 +13369,4 @@
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,5 +205,8 @@ public enum TableNameEnum
|
||||||
Quotation,
|
Quotation,
|
||||||
QuotationItem,
|
QuotationItem,
|
||||||
QuotationStatus,
|
QuotationStatus,
|
||||||
DeliveryTerm
|
DeliveryTerm,
|
||||||
|
OrderStatus,
|
||||||
|
PurchaseOrder,
|
||||||
|
PurchaseOrderItem
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,9 @@ public static class TableNameResolver
|
||||||
{ nameof(TableNameEnum.Quotation), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
{ nameof(TableNameEnum.Quotation), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
{ nameof(TableNameEnum.QuotationItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
{ nameof(TableNameEnum.QuotationItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
{ nameof(TableNameEnum.QuotationStatus), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
{ nameof(TableNameEnum.QuotationStatus), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
|
{ nameof(TableNameEnum.OrderStatus), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
|
{ nameof(TableNameEnum.PurchaseOrder), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
|
{ nameof(TableNameEnum.PurchaseOrderItem), (TablePrefix.TenantByName, MenuPrefix.SupplyChain) },
|
||||||
|
|
||||||
// CRM
|
// CRM
|
||||||
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
{ nameof(TableNameEnum.CustomerSegment), (TablePrefix.TenantByName, MenuPrefix.Crm) },
|
||||||
|
|
|
||||||
|
|
@ -533,6 +533,9 @@ public static class SeedConsts
|
||||||
public const string QuotationStatus = Default + ".QuotationStatus";
|
public const string QuotationStatus = Default + ".QuotationStatus";
|
||||||
public const string Quotation = Default + ".Quotation";
|
public const string Quotation = Default + ".Quotation";
|
||||||
public const string QuotationItem = Default + ".QuotationItem";
|
public const string QuotationItem = Default + ".QuotationItem";
|
||||||
|
public const string OrderStatus = Default + ".OrderStatus";
|
||||||
|
public const string PurchaseOrder = Default + ".PurchaseOrder";
|
||||||
|
public const string PurchaseOrderItem = Default + ".PurchaseOrderItem";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Maintenance
|
public static class Maintenance
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
|
public class OrderStatus : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -48,6 +48,7 @@ public class Partner : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public ICollection<PartnerBank> Banks { get; set; }
|
public ICollection<PartnerBank> Banks { get; set; }
|
||||||
public ICollection<PartnerCertificate> Certificates { get; set; }
|
public ICollection<PartnerCertificate> Certificates { get; set; }
|
||||||
public ICollection<PartnerContact> Contacts { get; set; }
|
public ICollection<PartnerContact> Contacts { get; set; }
|
||||||
|
public ICollection<PurchaseOrder> PurchaseOrders { get; set; }
|
||||||
|
|
||||||
//Customer ile ilgil bilgiler
|
//Customer ile ilgil bilgiler
|
||||||
public Guid? CustomerTypeId { get; set; }
|
public Guid? CustomerTypeId { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ public class PaymentTerm : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
|
|
||||||
public ICollection<Quotation> Quotations { get; set; }
|
public ICollection<Quotation> Quotations { get; set; }
|
||||||
|
public ICollection<PurchaseOrder> PurchaseOrders { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
|
public class PurchaseOrder : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public string OrderNumber { get; set; }
|
||||||
|
|
||||||
|
public Guid SupplierId { get; set; }
|
||||||
|
public Partner Supplier { get; set; }
|
||||||
|
|
||||||
|
public DateTime OrderDate { get; set; }
|
||||||
|
public DateTime? DeliveryDate { get; set; }
|
||||||
|
|
||||||
|
public Guid PaymentTermId { get; set; }
|
||||||
|
public PaymentTerm PaymentTerm { get; set; }
|
||||||
|
|
||||||
|
public string Terms { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
|
||||||
|
public Guid? RequestId { get; set; }
|
||||||
|
public Request? Request { get; set; }
|
||||||
|
|
||||||
|
public Guid? QuotationId { get; set; }
|
||||||
|
public Quotation? Quotation { get; set; }
|
||||||
|
|
||||||
|
public string Currency { get; set; }
|
||||||
|
public decimal ExchangeRate { get; set; }
|
||||||
|
public decimal Subtotal { get; set; }
|
||||||
|
public decimal TaxAmount { get; set; }
|
||||||
|
public decimal TotalAmount { get; set; }
|
||||||
|
|
||||||
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
public ICollection<PurchaseOrderItem> PurchaseOrders { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
using System;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
|
public class PurchaseOrderItem : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public Guid PurchaseOrderId { get; set; }
|
||||||
|
public PurchaseOrder PurchaseOrder { get; set; }
|
||||||
|
|
||||||
|
public Guid MaterialId { get; set; }
|
||||||
|
public Material Material { get; set; }
|
||||||
|
|
||||||
|
public decimal UnitPrice { get; set; }
|
||||||
|
public decimal Quantity { get; set; }
|
||||||
|
public string Uom { get; set; }
|
||||||
|
public decimal TotalPrice { get; set; }
|
||||||
|
|
||||||
|
public decimal ReceivedQuantity { get; set; }
|
||||||
|
public decimal DeliveredQuantity { get; set; }
|
||||||
|
public decimal RemainingQuantity { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -50,4 +50,5 @@ public class Quotation : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public DateTime? EvaluatedAt { get; set; } //Değerlendirme Tarihi
|
public DateTime? EvaluatedAt { get; set; } //Değerlendirme Tarihi
|
||||||
|
|
||||||
public ICollection<QuotationItem> Items { get; set; }
|
public ICollection<QuotationItem> Items { get; set; }
|
||||||
|
public ICollection<PurchaseOrder> PurchaseOrders { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,7 @@ public class Request : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
public List<RequestItem> Items { get; set; } = [];
|
public List<RequestItem> Items { get; set; } = [];
|
||||||
|
|
||||||
|
public ICollection<PurchaseOrder> PurchaseOrders { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,8 @@ public class PlatformDbContext :
|
||||||
public DbSet<QuotationStatus> QuotationStatuses { get; set; }
|
public DbSet<QuotationStatus> QuotationStatuses { get; set; }
|
||||||
public DbSet<Quotation> Quotations { get; set; }
|
public DbSet<Quotation> Quotations { get; set; }
|
||||||
public DbSet<QuotationItem> QuotationItems { get; set; }
|
public DbSet<QuotationItem> QuotationItems { get; set; }
|
||||||
|
public DbSet<OrderStatus> OrderStatuses { get; set; }
|
||||||
|
public DbSet<PurchaseOrder> PurchaseOrders { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Crm
|
#region Crm
|
||||||
|
|
@ -2749,7 +2751,7 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.MaterialId).IsRequired();
|
b.Property(x => x.MaterialId).IsRequired();
|
||||||
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
|
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
b.Property(x => x.Uom).IsRequired();
|
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.EstimatedPrice).HasPrecision(18, 2).HasDefaultValue(0);
|
b.Property(x => x.EstimatedPrice).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
b.Property(x => x.Specification).HasMaxLength(500);
|
b.Property(x => x.Specification).HasMaxLength(500);
|
||||||
b.Property(x => x.Justification).HasMaxLength(500);
|
b.Property(x => x.Justification).HasMaxLength(500);
|
||||||
|
|
@ -2817,7 +2819,7 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.SpecificationName).IsRequired().HasMaxLength(200);
|
b.Property(x => x.SpecificationName).IsRequired().HasMaxLength(200);
|
||||||
b.Property(x => x.SpecificationValue).IsRequired().HasMaxLength(200);
|
b.Property(x => x.SpecificationValue).IsRequired().HasMaxLength(200);
|
||||||
b.Property(x => x.Uom).IsRequired();
|
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.IsRequired).HasDefaultValue(false);
|
b.Property(x => x.IsRequired).HasDefaultValue(false);
|
||||||
|
|
||||||
b.HasOne(x => x.Workcenter)
|
b.HasOne(x => x.Workcenter)
|
||||||
|
|
@ -3180,7 +3182,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.BomId).IsRequired();
|
b.Property(x => x.BomId).IsRequired();
|
||||||
b.Property(x => x.MaterialId).IsRequired();
|
b.Property(x => x.MaterialId).IsRequired();
|
||||||
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
|
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
b.Property(x => x.Uom).IsRequired();
|
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.ScrapPercentage).HasPrecision(18, 2).HasDefaultValue(0);
|
b.Property(x => x.ScrapPercentage).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
b.Property(x => x.IsPhantom).HasDefaultValue(false);
|
b.Property(x => x.IsPhantom).HasDefaultValue(false);
|
||||||
b.Property(x => x.Position).HasDefaultValue(0);
|
b.Property(x => x.Position).HasDefaultValue(0);
|
||||||
|
|
@ -3513,7 +3515,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.QuotationId).IsRequired();
|
b.Property(x => x.QuotationId).IsRequired();
|
||||||
b.Property(x => x.MaterialId).IsRequired();
|
b.Property(x => x.MaterialId).IsRequired();
|
||||||
b.Property(x => x.Quantity).HasPrecision(18, 2).IsRequired();
|
b.Property(x => x.Quantity).HasPrecision(18, 2).IsRequired();
|
||||||
b.Property(x => x.Uom).IsRequired().HasMaxLength(128);
|
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.UnitPrice).HasPrecision(18, 2).IsRequired();
|
b.Property(x => x.UnitPrice).HasPrecision(18, 2).IsRequired();
|
||||||
b.Property(x => x.TotalPrice).HasPrecision(18, 2).IsRequired();
|
b.Property(x => x.TotalPrice).HasPrecision(18, 2).IsRequired();
|
||||||
b.Property(x => x.LeadTime).HasDefaultValue(0);
|
b.Property(x => x.LeadTime).HasDefaultValue(0);
|
||||||
|
|
@ -3576,5 +3578,82 @@ public class PlatformDbContext :
|
||||||
.HasForeignKey(x => x.WorkorderId)
|
.HasForeignKey(x => x.WorkorderId)
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
builder.Entity<OrderStatus>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.OrderStatus)), 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<PurchaseOrder>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PurchaseOrder)), Prefix.DbSchema);
|
||||||
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
|
b.Property(x => x.OrderNumber).IsRequired().HasMaxLength(50);
|
||||||
|
b.Property(x => x.SupplierId).IsRequired();
|
||||||
|
b.Property(x => x.OrderDate).IsRequired();
|
||||||
|
b.Property(x => x.PaymentTermId).IsRequired();
|
||||||
|
b.Property(x => x.Status).IsRequired().HasMaxLength(64);
|
||||||
|
b.Property(x => x.Currency).IsRequired().HasMaxLength(8);
|
||||||
|
|
||||||
|
b.Property(x => x.ExchangeRate).HasPrecision(18, 2).HasDefaultValue(1);
|
||||||
|
b.Property(x => x.Subtotal).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
b.Property(x => x.TaxAmount).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
b.Property(x => x.TotalAmount).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.Property(x => x.Notes).HasMaxLength(1000);
|
||||||
|
b.Property(x => x.Terms).HasMaxLength(1000);
|
||||||
|
|
||||||
|
b.HasOne(x => x.PaymentTerm)
|
||||||
|
.WithMany(x => x.PurchaseOrders)
|
||||||
|
.HasForeignKey(x => x.PaymentTermId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Supplier)
|
||||||
|
.WithMany(x => x.PurchaseOrders)
|
||||||
|
.HasForeignKey(x => x.SupplierId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Request)
|
||||||
|
.WithMany(x => x.PurchaseOrders)
|
||||||
|
.HasForeignKey(x => x.RequestId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired(false);
|
||||||
|
|
||||||
|
b.HasOne(x => x.Quotation)
|
||||||
|
.WithMany(x => x.PurchaseOrders)
|
||||||
|
.HasForeignKey(x => x.QuotationId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Entity<PurchaseOrderItem>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PurchaseOrderItem)), Prefix.DbSchema);
|
||||||
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
|
b.Property(x => x.PurchaseOrderId).IsRequired();
|
||||||
|
b.Property(x => x.MaterialId).IsRequired();
|
||||||
|
b.Property(x => x.UnitPrice).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(1);
|
||||||
|
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||||
|
b.Property(x => x.TotalPrice).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.Property(x => x.ReceivedQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
b.Property(x => x.DeliveredQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
b.Property(x => x.RemainingQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||||
|
|
||||||
|
b.Property(x => x.Description).HasMaxLength(1000);
|
||||||
|
|
||||||
|
b.HasOne(x => x.PurchaseOrder)
|
||||||
|
.WithMany(x => x.PurchaseOrders)
|
||||||
|
.HasForeignKey(x => x.PurchaseOrderId)
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Erp.Platform.Migrations
|
namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251203205612_Initial")]
|
[Migration("20251204121428_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -1677,7 +1677,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<DateTime>("ValidFrom")
|
b.Property<DateTime>("ValidFrom")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -8252,6 +8253,64 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_OrderItem", (string)null);
|
b.ToTable("Adm_T_OrderItem", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.OrderStatus", 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("Scp_T_OrderStatus", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Overtime", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Overtime", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10144,6 +10203,222 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_Psychologist", (string)null);
|
b.ToTable("Adm_T_Psychologist", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", 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<string>("Currency")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(8)
|
||||||
|
.HasColumnType("nvarchar(8)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeliveryDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<decimal>("ExchangeRate")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(1m);
|
||||||
|
|
||||||
|
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>("Notes")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("OrderDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("OrderNumber")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<Guid>("PaymentTermId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("QuotationId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("RequestId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Status")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.Property<decimal>("Subtotal")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid>("SupplierId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<decimal>("TaxAmount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Terms")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<decimal>("TotalAmount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("PaymentTermId");
|
||||||
|
|
||||||
|
b.HasIndex("QuotationId");
|
||||||
|
|
||||||
|
b.HasIndex("RequestId");
|
||||||
|
|
||||||
|
b.HasIndex("SupplierId");
|
||||||
|
|
||||||
|
b.ToTable("Scp_T_PurchaseOrder", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrderItem", 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<decimal>("DeliveredQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
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<Guid>("MaterialId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("PurchaseOrderId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<decimal>("Quantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(1m);
|
||||||
|
|
||||||
|
b.Property<decimal>("ReceivedQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<decimal>("RemainingQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<decimal>("TotalPrice")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<decimal>("UnitPrice")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<string>("Uom")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("MaterialId");
|
||||||
|
|
||||||
|
b.HasIndex("PurchaseOrderId");
|
||||||
|
|
||||||
|
b.ToTable("Scp_T_PurchaseOrderItem", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10774,8 +11049,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -11374,7 +11649,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -14283,7 +14559,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<Guid>("WorkcenterId")
|
b.Property<Guid>("WorkcenterId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
@ -18268,6 +18545,58 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Project");
|
b.Navigation("Project");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.PaymentTerm", "PaymentTerm")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("PaymentTermId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Quotation", "Quotation")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("QuotationId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Request", "Request")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("RequestId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Partner", "Supplier")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("SupplierId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("PaymentTerm");
|
||||||
|
|
||||||
|
b.Navigation("Quotation");
|
||||||
|
|
||||||
|
b.Navigation("Request");
|
||||||
|
|
||||||
|
b.Navigation("Supplier");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrderItem", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("MaterialId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.PurchaseOrder", "PurchaseOrder")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("PurchaseOrderId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Material");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrder");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
||||||
|
|
@ -19274,6 +19603,8 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Certificates");
|
b.Navigation("Certificates");
|
||||||
|
|
||||||
b.Navigation("Contacts");
|
b.Navigation("Contacts");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
||||||
|
|
@ -19283,6 +19614,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
||||||
{
|
{
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
|
|
||||||
b.Navigation("Quotations");
|
b.Navigation("Quotations");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -19319,6 +19652,11 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("DailyLogs");
|
b.Navigation("DailyLogs");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Conditions");
|
b.Navigation("Conditions");
|
||||||
|
|
@ -19337,6 +19675,8 @@ namespace Erp.Platform.Migrations
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||||
|
|
@ -19366,6 +19706,8 @@ namespace Erp.Platform.Migrations
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Request", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Request", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.RequestType", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.RequestType", b =>
|
||||||
|
|
@ -2710,6 +2710,28 @@ namespace Erp.Platform.Migrations
|
||||||
table.PrimaryKey("PK_Scp_T_MaterialType", x => x.Id);
|
table.PrimaryKey("PK_Scp_T_MaterialType", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Scp_T_OrderStatus",
|
||||||
|
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_Scp_T_OrderStatus", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Scp_T_PaymentTerm",
|
name: "Scp_T_PaymentTerm",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -5616,7 +5638,7 @@ namespace Erp.Platform.Migrations
|
||||||
WorkcenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
WorkcenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
SpecificationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
SpecificationName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||||
SpecificationValue = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
SpecificationValue = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||||
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
IsRequired = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
IsRequired = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
|
@ -6392,7 +6414,7 @@ namespace Erp.Platform.Migrations
|
||||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
OperationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
OperationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
ScrapPercentage = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
ScrapPercentage = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
IsPhantom = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
IsPhantom = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
Position = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
Position = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||||
|
|
@ -6708,7 +6730,7 @@ namespace Erp.Platform.Migrations
|
||||||
QuotationId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
QuotationId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||||
Uom = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
UnitPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
UnitPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||||
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
|
||||||
LeadTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
LeadTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||||
|
|
@ -6738,6 +6760,64 @@ namespace Erp.Platform.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Scp_T_PurchaseOrder",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
OrderNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
|
SupplierId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
OrderDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DeliveryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
PaymentTermId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Terms = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
|
Notes = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
|
RequestId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
QuotationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
Currency = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: false),
|
||||||
|
ExchangeRate = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m),
|
||||||
|
Subtotal = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
TaxAmount = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
TotalAmount = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, 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_Scp_T_PurchaseOrder", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrder_Adm_T_Partner_SupplierId",
|
||||||
|
column: x => x.SupplierId,
|
||||||
|
principalTable: "Adm_T_Partner",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrder_Scp_T_PaymentTerm_PaymentTermId",
|
||||||
|
column: x => x.PaymentTermId,
|
||||||
|
principalTable: "Scp_T_PaymentTerm",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrder_Scp_T_Quotation_QuotationId",
|
||||||
|
column: x => x.QuotationId,
|
||||||
|
principalTable: "Scp_T_Quotation",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrder_Scp_T_Request_RequestId",
|
||||||
|
column: x => x.RequestId,
|
||||||
|
principalTable: "Scp_T_Request",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Scp_T_RequestItem",
|
name: "Scp_T_RequestItem",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -6747,7 +6827,7 @@ namespace Erp.Platform.Migrations
|
||||||
RequestId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
RequestId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
Uom = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
EstimatedPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
EstimatedPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
Specification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
Specification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||||
Justification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
Justification = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||||
|
|
@ -6915,6 +6995,47 @@ namespace Erp.Platform.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Scp_T_PurchaseOrderItem",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
PurchaseOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
UnitPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 1m),
|
||||||
|
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
|
TotalPrice = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
ReceivedQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
DeliveredQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
RemainingQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
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_Scp_T_PurchaseOrderItem", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrderItem_Scp_T_Material_MaterialId",
|
||||||
|
column: x => x.MaterialId,
|
||||||
|
principalTable: "Scp_T_Material",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Scp_T_PurchaseOrderItem_Scp_T_PurchaseOrder_PurchaseOrderId",
|
||||||
|
column: x => x.PurchaseOrderId,
|
||||||
|
principalTable: "Scp_T_PurchaseOrder",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Str_T_Location",
|
name: "Str_T_Location",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -8502,6 +8623,36 @@ namespace Erp.Platform.Migrations
|
||||||
table: "Scp_T_MaterialSpecification",
|
table: "Scp_T_MaterialSpecification",
|
||||||
column: "UnitId");
|
column: "UnitId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrder_PaymentTermId",
|
||||||
|
table: "Scp_T_PurchaseOrder",
|
||||||
|
column: "PaymentTermId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrder_QuotationId",
|
||||||
|
table: "Scp_T_PurchaseOrder",
|
||||||
|
column: "QuotationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrder_RequestId",
|
||||||
|
table: "Scp_T_PurchaseOrder",
|
||||||
|
column: "RequestId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrder_SupplierId",
|
||||||
|
table: "Scp_T_PurchaseOrder",
|
||||||
|
column: "SupplierId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrderItem_MaterialId",
|
||||||
|
table: "Scp_T_PurchaseOrderItem",
|
||||||
|
column: "MaterialId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Scp_T_PurchaseOrderItem_PurchaseOrderId",
|
||||||
|
table: "Scp_T_PurchaseOrderItem",
|
||||||
|
column: "PurchaseOrderId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Scp_T_Quotation_DeliveryTermId",
|
name: "IX_Scp_T_Quotation_DeliveryTermId",
|
||||||
table: "Scp_T_Quotation",
|
table: "Scp_T_Quotation",
|
||||||
|
|
@ -9123,6 +9274,12 @@ namespace Erp.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Scp_T_MaterialSpecification");
|
name: "Scp_T_MaterialSpecification");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Scp_T_OrderStatus");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Scp_T_PurchaseOrderItem");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Scp_T_QuotationItem");
|
name: "Scp_T_QuotationItem");
|
||||||
|
|
||||||
|
|
@ -9253,10 +9410,7 @@ namespace Erp.Platform.Migrations
|
||||||
name: "Adm_T_Uom");
|
name: "Adm_T_Uom");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Scp_T_Quotation");
|
name: "Scp_T_PurchaseOrder");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Scp_T_Request");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Str_T_LocationType");
|
name: "Str_T_LocationType");
|
||||||
|
|
@ -9331,16 +9485,10 @@ namespace Erp.Platform.Migrations
|
||||||
name: "Adm_T_UomCategory");
|
name: "Adm_T_UomCategory");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Adm_T_PaymentMethod");
|
name: "Scp_T_Quotation");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Scp_T_DeliveryTerm");
|
name: "Scp_T_Request");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Scp_T_QuotationStatus");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Scp_T_RequestType");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Str_T_Warehouse");
|
name: "Str_T_Warehouse");
|
||||||
|
|
@ -9360,6 +9508,18 @@ namespace Erp.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Sas_H_CountryGroup");
|
name: "Sas_H_CountryGroup");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Adm_T_PaymentMethod");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Scp_T_DeliveryTerm");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Scp_T_QuotationStatus");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Scp_T_RequestType");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Str_T_WarehouseType");
|
name: "Str_T_WarehouseType");
|
||||||
|
|
||||||
|
|
@ -1674,7 +1674,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<DateTime>("ValidFrom")
|
b.Property<DateTime>("ValidFrom")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -8249,6 +8250,64 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_OrderItem", (string)null);
|
b.ToTable("Adm_T_OrderItem", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.OrderStatus", 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("Scp_T_OrderStatus", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Overtime", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Overtime", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10141,6 +10200,222 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_Psychologist", (string)null);
|
b.ToTable("Adm_T_Psychologist", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", 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<string>("Currency")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(8)
|
||||||
|
.HasColumnType("nvarchar(8)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeliveryDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<decimal>("ExchangeRate")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(1m);
|
||||||
|
|
||||||
|
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>("Notes")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("OrderDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("OrderNumber")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<Guid>("PaymentTermId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("QuotationId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("RequestId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Status")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.Property<decimal>("Subtotal")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid>("SupplierId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<decimal>("TaxAmount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Terms")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<decimal>("TotalAmount")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("PaymentTermId");
|
||||||
|
|
||||||
|
b.HasIndex("QuotationId");
|
||||||
|
|
||||||
|
b.HasIndex("RequestId");
|
||||||
|
|
||||||
|
b.HasIndex("SupplierId");
|
||||||
|
|
||||||
|
b.ToTable("Scp_T_PurchaseOrder", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrderItem", 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<decimal>("DeliveredQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
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<Guid>("MaterialId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("PurchaseOrderId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<decimal>("Quantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(1m);
|
||||||
|
|
||||||
|
b.Property<decimal>("ReceivedQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<decimal>("RemainingQuantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<decimal>("TotalPrice")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<decimal>("UnitPrice")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)")
|
||||||
|
.HasDefaultValue(0m);
|
||||||
|
|
||||||
|
b.Property<string>("Uom")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("MaterialId");
|
||||||
|
|
||||||
|
b.HasIndex("PurchaseOrderId");
|
||||||
|
|
||||||
|
b.ToTable("Scp_T_PurchaseOrderItem", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -10771,8 +11046,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(64)
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -11371,7 +11646,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -14280,7 +14556,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Uom")
|
b.Property<string>("Uom")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<Guid>("WorkcenterId")
|
b.Property<Guid>("WorkcenterId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
@ -18265,6 +18542,58 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Project");
|
b.Navigation("Project");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.PaymentTerm", "PaymentTerm")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("PaymentTermId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Quotation", "Quotation")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("QuotationId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Request", "Request")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("RequestId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Partner", "Supplier")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("SupplierId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("PaymentTerm");
|
||||||
|
|
||||||
|
b.Navigation("Quotation");
|
||||||
|
|
||||||
|
b.Navigation("Request");
|
||||||
|
|
||||||
|
b.Navigation("Supplier");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrderItem", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("MaterialId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.PurchaseOrder", "PurchaseOrder")
|
||||||
|
.WithMany("PurchaseOrders")
|
||||||
|
.HasForeignKey("PurchaseOrderId")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Material");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrder");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
||||||
|
|
@ -19271,6 +19600,8 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Certificates");
|
b.Navigation("Certificates");
|
||||||
|
|
||||||
b.Navigation("Contacts");
|
b.Navigation("Contacts");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PaymentMethod", b =>
|
||||||
|
|
@ -19280,6 +19611,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.PaymentTerm", b =>
|
||||||
{
|
{
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
|
|
||||||
b.Navigation("Quotations");
|
b.Navigation("Quotations");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -19316,6 +19649,11 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("DailyLogs");
|
b.Navigation("DailyLogs");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PurchaseOrder", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Conditions");
|
b.Navigation("Conditions");
|
||||||
|
|
@ -19334,6 +19672,8 @@ namespace Erp.Platform.Migrations
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Quotation", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.QuotationStatus", b =>
|
||||||
|
|
@ -19363,6 +19703,8 @@ namespace Erp.Platform.Migrations
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Request", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Request", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
|
|
||||||
|
b.Navigation("PurchaseOrders");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.RequestType", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.RequestType", b =>
|
||||||
|
|
|
||||||
|
|
@ -100,9 +100,7 @@
|
||||||
"props": null,
|
"props": null,
|
||||||
"description": null,
|
"description": null,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
"dependencies": [
|
"dependencies": ["DynamicEntityComponent"]
|
||||||
"DynamicEntityComponent"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ReportCategories": [
|
"ReportCategories": [
|
||||||
|
|
@ -2431,12 +2429,7 @@
|
||||||
"minSalary": 80000,
|
"minSalary": 80000,
|
||||||
"maxSalary": 120000,
|
"maxSalary": 120000,
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
"requiredSkills": [
|
"requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"],
|
||||||
"JavaScript",
|
|
||||||
"TypeScript",
|
|
||||||
"React",
|
|
||||||
"Node.js"
|
|
||||||
],
|
|
||||||
"responsibilities": [
|
"responsibilities": [
|
||||||
"Develop frontend and backend applications",
|
"Develop frontend and backend applications",
|
||||||
"Write clean and maintainable code",
|
"Write clean and maintainable code",
|
||||||
|
|
@ -4131,9 +4124,7 @@
|
||||||
{
|
{
|
||||||
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
||||||
"type": "video",
|
"type": "video",
|
||||||
"urls": [
|
"urls": ["https://www.w3schools.com/html/mov_bbb.mp4"]
|
||||||
"https://www.w3schools.com/html/mov_bbb.mp4"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"SocialPollOptions": [
|
"SocialPollOptions": [
|
||||||
|
|
@ -6299,9 +6290,7 @@
|
||||||
"isActive": true
|
"isActive": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ProjectTaskDailies" : [
|
"ProjectTaskDailies": [],
|
||||||
|
|
||||||
],
|
|
||||||
"DeliveryTerms": [
|
"DeliveryTerms": [
|
||||||
{
|
{
|
||||||
"name": "15 Gün",
|
"name": "15 Gün",
|
||||||
|
|
@ -6355,5 +6344,72 @@
|
||||||
"description": "Teklifin süresinin dolduğunu ifade eder",
|
"description": "Teklifin süresinin dolduğunu ifade eder",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"OrderStatuses": [
|
||||||
|
{
|
||||||
|
"name": "Taslak",
|
||||||
|
"description": "Teklifin taslak aşamasında olduğunu ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Beklemede",
|
||||||
|
"description": "Teklifin beklemede olduğunu ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Onaylandı",
|
||||||
|
"description": "Teklifin onaylandığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gönderildi",
|
||||||
|
"description": "Teklifin gönderildiğini ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Onaylandı",
|
||||||
|
"description": "Teklifin onaylandığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Kısmen Teslim Edildi",
|
||||||
|
"description": "Teklifin bir kısmının teslim edildiğini ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Kısmen Alındı",
|
||||||
|
"description": "Teklifin bir kısmının alındığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Alındı",
|
||||||
|
"description": "Teklifin alındığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Teslim Edildi",
|
||||||
|
"description": "Teklifin teslim edildiğini ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Faturalandırıldı",
|
||||||
|
"description": "Teklifin faturalandırıldığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tamamlandı",
|
||||||
|
"description": "Teklifin tamamlandığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Kapatıldı",
|
||||||
|
"description": "Teklifin kapatıldığını ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "İptal Edildi",
|
||||||
|
"description": "Teklifin iptal edildiğini ifade eder",
|
||||||
|
"isActive": true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<ProjectTask, Guid> _projectTaskRepository;
|
private readonly IRepository<ProjectTask, Guid> _projectTaskRepository;
|
||||||
private readonly IRepository<DeliveryTerm, Guid> _deliveryTermRepository;
|
private readonly IRepository<DeliveryTerm, Guid> _deliveryTermRepository;
|
||||||
private readonly IRepository<QuotationStatus, Guid> _quotationStatusRepository;
|
private readonly IRepository<QuotationStatus, Guid> _quotationStatusRepository;
|
||||||
|
private readonly IRepository<OrderStatus, Guid> _orderStatusRepository;
|
||||||
|
|
||||||
public TenantDataSeeder(
|
public TenantDataSeeder(
|
||||||
IClock clock,
|
IClock clock,
|
||||||
|
|
@ -260,7 +261,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<ProjectPhase, Guid> projectPhaseRepository,
|
IRepository<ProjectPhase, Guid> projectPhaseRepository,
|
||||||
IRepository<ProjectTask, Guid> projectTaskRepository,
|
IRepository<ProjectTask, Guid> projectTaskRepository,
|
||||||
IRepository<DeliveryTerm, Guid> deliveryTermRepository,
|
IRepository<DeliveryTerm, Guid> deliveryTermRepository,
|
||||||
IRepository<QuotationStatus, Guid> quotationStatusRepository
|
IRepository<QuotationStatus, Guid> quotationStatusRepository,
|
||||||
|
IRepository<OrderStatus, Guid> orderStatusRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_clock = clock;
|
_clock = clock;
|
||||||
|
|
@ -384,6 +386,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
_projectTaskRepository = projectTaskRepository;
|
_projectTaskRepository = projectTaskRepository;
|
||||||
_deliveryTermRepository = deliveryTermRepository;
|
_deliveryTermRepository = deliveryTermRepository;
|
||||||
_quotationStatusRepository = quotationStatusRepository;
|
_quotationStatusRepository = quotationStatusRepository;
|
||||||
|
_orderStatusRepository = orderStatusRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IConfigurationRoot BuildConfiguration()
|
private static IConfigurationRoot BuildConfiguration()
|
||||||
|
|
@ -2684,6 +2687,20 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IsActive = item.IsActive
|
IsActive = item.IsActive
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var item in items.OrderStatuses)
|
||||||
|
{
|
||||||
|
var exists = await _orderStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
if (exists)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
await _orderStatusRepository.InsertAsync(new OrderStatus
|
||||||
|
{
|
||||||
|
Name = item.Name,
|
||||||
|
Description = item.Description,
|
||||||
|
IsActive = item.IsActive
|
||||||
|
}, autoSave: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ public class TenantSeederDto
|
||||||
public List<ApprovalSeedDto> Approvals { get; set; }
|
public List<ApprovalSeedDto> Approvals { get; set; }
|
||||||
public List<DeliveryTermSeedDto> DeliveryTerms { get; set; }
|
public List<DeliveryTermSeedDto> DeliveryTerms { get; set; }
|
||||||
public List<QuotationStatusSeedDto> QuotationStatuses { get; set; }
|
public List<QuotationStatusSeedDto> QuotationStatuses { get; set; }
|
||||||
|
public List<OrderStatusSeedDto> OrderStatuses { get; set; }
|
||||||
|
|
||||||
//Crm
|
//Crm
|
||||||
public List<PartnerSeedDto> Partners { get; set; }
|
public List<PartnerSeedDto> Partners { get; set; }
|
||||||
|
|
@ -142,6 +143,13 @@ public class TenantSeederDto
|
||||||
public List<ProjectTaskDailySeedDto> ProjectTaskDailies { get; set; }
|
public List<ProjectTaskDailySeedDto> ProjectTaskDailies { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class OrderStatusSeedDto
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class DeliveryTermSeedDto
|
public class DeliveryTermSeedDto
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -299,13 +299,14 @@ export function autoNumber() {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
const pad = (n: number, width: number) => n.toString().padStart(width, '0')
|
const pad = (n: number, width: number) => n.toString().padStart(width, '0')
|
||||||
|
|
||||||
|
const shortYear = pad(now.getFullYear() % 100, 2); // 2025 → 25
|
||||||
|
|
||||||
return (
|
return (
|
||||||
`${now.getFullYear()}` +
|
`${shortYear}` +
|
||||||
`${pad(now.getMonth() + 1, 2)}` +
|
`${pad(now.getMonth() + 1, 2)}` +
|
||||||
`${pad(now.getDate(), 2)}` +
|
`${pad(now.getDate(), 2)}` +
|
||||||
`${pad(now.getHours(), 2)}` +
|
`${pad(now.getHours(), 2)}` +
|
||||||
`${pad(now.getMinutes(), 2)}` +
|
`${pad(now.getMinutes(), 2)}` +
|
||||||
`${pad(now.getSeconds(), 2)}` +
|
`${pad(now.getSeconds(), 2)}`
|
||||||
`${pad(now.getMilliseconds(), 3)}`
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue