This commit is contained in:
@@ -193,6 +193,11 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
//NOTE: Many of these errors wouldn't happen in the official ayanova UI (api developer error only) so are not translated
|
||||
|
||||
//Description required (only affordance to open the record)
|
||||
if (string.IsNullOrWhiteSpace(proposedObj.Description))
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "Description");
|
||||
|
||||
if (!await BizObjectExistsInDatabase.ExistsAsync(AyaType.Part, proposedObj.PartId, ct))
|
||||
{
|
||||
AddError(ApiErrorCode.NOT_FOUND, "generalerror", $"PartInventory Part specified doesn't exist [id:{proposedObj.PartId}]");
|
||||
|
||||
@@ -390,6 +390,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = poItem.QuantityReceived *= -1;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
|
||||
//MIGRATE_OUTSTANDING - update workorderitempart here if applicable
|
||||
@@ -416,6 +417,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = poItem.QuantityReceived;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
|
||||
//MIGRATE_OUTSTANDING - update workorderitempart here if applicable
|
||||
@@ -447,6 +449,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = newItem.QuantityReceived;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
}
|
||||
|
||||
@@ -469,6 +472,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = oldItem.QuantityReceived *= -1;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
}
|
||||
|
||||
@@ -481,6 +485,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = newItem.QuantityReceived;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
}
|
||||
|
||||
@@ -507,6 +512,7 @@ namespace AyaNova.Biz
|
||||
i.Quantity = netChange;
|
||||
i.SourceType = AyaType.PurchaseOrder;
|
||||
i.SourceId = newObj.Id;
|
||||
i.Description = await Translate("PurchaseOrderEdit");
|
||||
await pib.CreateAsync(i);
|
||||
|
||||
//MIGRATE_OUTSTANDING - update workorderitempart here if applicable
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace AyaNova.Models
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
[Required]//this is only affordance to open in UI so always needs a value
|
||||
public string Description { get; set; }
|
||||
[Required]
|
||||
public DateTime EntryDate { get; set; }
|
||||
|
||||
@@ -764,6 +764,7 @@
|
||||
"PurchaseOrderReceiptItemReferenceNumber": "Referenz",
|
||||
"PurchaseOrderReceiptItemWarehouseID": "Teilelager",
|
||||
"PurchaseOrderReceiptItemWorkOrderNumber": "Arbeitsauftragsnummer",
|
||||
"PurchaseOrderEdit": "Bestellung geändert",
|
||||
"RateAccountNumber": "Kontonummer",
|
||||
"RateCharge": "Einzelhandelsgebühr",
|
||||
"RateCustomerGroupID": "Kundengruppe",
|
||||
|
||||
@@ -764,6 +764,7 @@
|
||||
"PurchaseOrderReceiptItemReferenceNumber": "Reference",
|
||||
"PurchaseOrderReceiptItemWarehouseID": "Part Warehouse",
|
||||
"PurchaseOrderReceiptItemWorkOrderNumber": "WorkOrder #",
|
||||
"PurchaseOrderEdit": "Purchase order edit",
|
||||
"RateAccountNumber": "Account Number",
|
||||
"RateCharge": "Retail Charge",
|
||||
"RateCustomerGroupID": "Customer Group",
|
||||
|
||||
@@ -763,6 +763,7 @@
|
||||
"PurchaseOrderReceiptItemReferenceNumber": "Referencia",
|
||||
"PurchaseOrderReceiptItemWarehouseID": "Almacén de la pieza",
|
||||
"PurchaseOrderReceiptItemWorkOrderNumber": "Núm. pedido",
|
||||
"PurchaseOrderEdit": "Orden de compra editar",
|
||||
"RateAccountNumber": "Número de cuenta",
|
||||
"RateCharge": "Cargo minorista",
|
||||
"RateCustomerGroupID": "Grupo de clientes",
|
||||
|
||||
@@ -764,6 +764,7 @@
|
||||
"PurchaseOrderReceiptItemReferenceNumber": "Référence",
|
||||
"PurchaseOrderReceiptItemWarehouseID": "Magasin de pièces",
|
||||
"PurchaseOrderReceiptItemWorkOrderNumber": "Bon de travail n° ",
|
||||
"PurchaseOrderEdit": "Bon de commande Modifier",
|
||||
"RateAccountNumber": "Numéro de compte",
|
||||
"RateCharge": "Prix de détail",
|
||||
"RateCustomerGroupID": "Groupe de clients",
|
||||
|
||||
@@ -699,7 +699,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
// await ExecQueryAsync("CREATE INDEX idx_apartassemblyitem_partassemblyid ON apartassemblyitem(partassemblyid)");
|
||||
|
||||
//PART INVENTORY
|
||||
await ExecQueryAsync("CREATE TABLE apartinventory (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, description TEXT NULL, " +
|
||||
await ExecQueryAsync("CREATE TABLE apartinventory (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, description TEXT NOT NULL, " +
|
||||
"entrydate TIMESTAMP NOT NULL, lastentrydate TIMESTAMP NULL, partid BIGINT NOT NULL REFERENCES apart, partwarehouseid BIGINT NOT NULL REFERENCES apartwarehouse, " +
|
||||
"sourcetype INTEGER, sourceid BIGINT, " +
|
||||
"quantity DECIMAL(19,4) NOT NULL, balance DECIMAL(19,4) NOT NULL, lastbalance DECIMAL(19,4) NULL, " +
|
||||
|
||||
Reference in New Issue
Block a user