case 4035
This commit is contained in:
@@ -34,15 +34,15 @@ namespace AyaNova.DataList
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() {
|
||||
"PartName",
|
||||
"PartName",
|
||||
"WorkOrderSerialNumber",
|
||||
"Customer",
|
||||
"WorkOrderItemPartRequestQuantity",
|
||||
"WorkOrderItemPartRequestPurchaseOrder",
|
||||
"WorkOrderItemPartRequestOrderedDate",
|
||||
"WorkOrderItemPartRequestExpectedReceiveDate",
|
||||
"WorkOrderItemPartRequestReceived"
|
||||
|
||||
"Customer",
|
||||
"WorkOrderItemPartRequestQuantity",
|
||||
"WorkOrderItemRequestDate",
|
||||
"WorkOrderItemPartRequestPurchaseOrder",
|
||||
"WorkOrderItemPartRequestOrderedDate",
|
||||
"WorkOrderItemPartRequestExpectedReceiveDate",
|
||||
"WorkOrderItemPartRequestReceived"
|
||||
};
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PartName", "+" }, { "WorkOrderSerialNumber", "-" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
@@ -107,6 +107,14 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "apart.upc"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "WorkOrderItemRequestDate",
|
||||
FieldKey = "WorkOrderItemRequestDate",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "aworkorderitempartrequest.requestdate"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PurchaseOrder",
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace AyaNova.Models
|
||||
public string AltWholesalerName { get; set; }
|
||||
public string RequestedByUserName { get; set; }
|
||||
public long? RequestedByUserId { get; set; }
|
||||
public DateTime RequestDate { get; set; }
|
||||
public string ManufacturerName { get; set; }
|
||||
public long? ManufacturerId { get; set; }
|
||||
public string ManufacturerNumber { get; set; }
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace AyaNova.Models
|
||||
[Required]
|
||||
public decimal Received { get; set; }
|
||||
|
||||
|
||||
public DateTime RequestDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public string PartNameViz { get; set; }
|
||||
|
||||
@@ -22,16 +22,16 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 1;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1320;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1322;
|
||||
internal const long EXPECTED_INDEX_COUNT = 153;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 518;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 519;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198;
|
||||
internal const long EXPECTED_VIEWS = 11;
|
||||
internal const long EXPECTED_ROUTINES = 2;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////////////////////////////// C1320:I153:CC518:FC198:V11:R2
|
||||
///////////////////////////////////////////////////////////////// C1322:I153:CC519:FC198:V11:R2
|
||||
|
||||
|
||||
|
||||
@@ -981,7 +981,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//WORKORDERITEM PART REQUEST
|
||||
await ExecQueryAsync("CREATE TABLE aworkorderitempartrequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
||||
+ "partid BIGINT NOT NULL REFERENCES apart, partwarehouseid BIGINT NOT NULL REFERENCES apartwarehouse, quantity DECIMAL(19,5) NOT NULL default 0, received DECIMAL(19,5) NOT NULL default 0, "
|
||||
+ "requestedbyuserid BIGINT NULL REFERENCES auser, purchaseorderitemid BIGINT NULL REFERENCES apurchaseorderitem ON DELETE SET NULL"
|
||||
+ "requestdate TIMESTAMPTZ NOT NULL, requestedbyuserid BIGINT NULL REFERENCES auser, purchaseorderitemid BIGINT NULL REFERENCES apurchaseorderitem ON DELETE SET NULL"
|
||||
+ ")");
|
||||
|
||||
//WORKORDERITEM SCHEDULED USER
|
||||
@@ -1083,7 +1083,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//VIEWPARTINVENTORYREQUESTLIST (note: twinned with pareventoryrequestdatalist, this drives reporting for that datalist which is not reportable directly)
|
||||
await ExecQueryAsync("CREATE VIEW VIEWPARTINVENTORYREQUESTLIST AS SELECT AWORKORDERITEMPARTREQUEST.ID AS REQUESTID, APART.ID AS PARTID, APARTWAREHOUSE.ID AS PARTWAREHOUSEID, QUANTITY, "
|
||||
+ "APART.DESCRIPTION AS PARTDESCRIPTION, APART.NAME AS PARTNAME, APARTWAREHOUSE.NAME AS PARTWAREHOUSENAME, AWHOLESALER.NAME AS WHOLESALERNAME, "
|
||||
+ "AWORKORDER.SERIAL AS WOSERIAL, AWORKORDERITEMPARTREQUEST.REQUESTEDBYUSERID AS REQUESTEDBYUSERID, AUSER.NAME AS REQUESTEDBYUSERNAME, "
|
||||
+ "AWORKORDER.SERIAL AS WOSERIAL, AWORKORDERITEMPARTREQUEST.REQUESTDATE, AWORKORDERITEMPARTREQUEST.REQUESTEDBYUSERID AS REQUESTEDBYUSERID, AUSER.NAME AS REQUESTEDBYUSERNAME, "
|
||||
+ "AWHOLESALER.ID AS WHOLESALERID, AALTWHOLESALER.ID AS ALTWHOLESALERID, AALTWHOLESALER.NAME AS ALTWHOLESALERNAME, "
|
||||
+ "APARTMANU.NAME AS MANUFACTURERNAME, APARTMANU.ID AS MANUFACTURERID, APART.UPC AS PARTUPC, APURCHASEORDER.ID AS PURCHASEORDERID, APURCHASEORDER.SERIAL AS PURCHASEORDERSERIAL, "
|
||||
+ "APURCHASEORDER.EXPECTEDRECEIVEDATE AS EXPECTEDRECEIVEDATE, APURCHASEORDER.ORDEREDDATE AS ORDEREDDATE, AWORKORDERITEMPARTREQUEST.RECEIVED AS PARTREQUESTRECEIVED, APOVENDOR.NAME AS PURCHASEORDERVENDOR, "
|
||||
|
||||
@@ -3041,19 +3041,19 @@ namespace AyaNova.Util
|
||||
};
|
||||
woItem.Parts.Add(woItemPart);
|
||||
|
||||
//PARTREQUESTS
|
||||
if (Fake.Random.Bool())//50%
|
||||
{
|
||||
var woItemPartRequest = new WorkOrderItemPartRequest()
|
||||
{
|
||||
// //PARTREQUESTS
|
||||
// if (Fake.Random.Bool())//50%
|
||||
// {
|
||||
// var woItemPartRequest = new WorkOrderItemPartRequest()
|
||||
// {
|
||||
|
||||
Quantity = 1,
|
||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
PartWarehouseId = 1,
|
||||
PurchaseOrderItemId = Fake.Random.Long(1, TotalSeededPurchaseOrders)//yes it's POITEM vs po but each po has at least one item so this will work
|
||||
};
|
||||
woItem.PartRequests.Add(woItemPartRequest);
|
||||
}
|
||||
// Quantity = 1,
|
||||
// PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
// PartWarehouseId = 1,
|
||||
// PurchaseOrderItemId = Fake.Random.Long(1, TotalSeededPurchaseOrders)//yes it's POITEM vs po but each po has at least one item so this will work
|
||||
// };
|
||||
// woItem.PartRequests.Add(woItemPartRequest);
|
||||
// }
|
||||
|
||||
|
||||
//LOANERS
|
||||
|
||||
Reference in New Issue
Block a user