diff --git a/server/AyaNova/biz/PartBiz.cs b/server/AyaNova/biz/PartBiz.cs index ec353e35..5e9f2e84 100644 --- a/server/AyaNova/biz/PartBiz.cs +++ b/server/AyaNova/biz/PartBiz.cs @@ -488,7 +488,7 @@ namespace AyaNova.Biz if (await ct.PartAssemblyItem.AnyAsync(z => z.PartId == inObj.Id) == true) AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartAssembly")); if (await ct.PartInventory.AnyAsync(z => z.PartId == inObj.Id) == true) - AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartInventoryList"));//translates to "Part inventory" + AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartInventoryDataList"));//translates to "Part inventory" if (await ct.PartStockLevel.AnyAsync(m => m.PartId == inObj.Id)) AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartStockingLevels")); if (await ct.PurchaseOrderItem.AnyAsync(m => m.PartId == inObj.Id)) diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index 03a7d1c9..af686f79 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -712,7 +712,7 @@ "PartInventoryAdjustment": "Teilebestandberichtigung", "PartInventoryBalance": "Vorrätig", "PartInventoryId": "Inventar-ID", - "PartInventoryList": "Teileinventar", + "PartInventoryDataList": "Teileinventar", "PartInventoryTransaction": "Inventartransaktion", "PartInventoryTransactionDescription": "Beschreibung", "PartInventoryTransactionEntryDate": "Datum", diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 566f9950..e1138e27 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -712,7 +712,7 @@ "PartInventoryAdjustment": "Part inventory adjustment", "PartInventoryBalance": "On Hand", "PartInventoryId": "Inventory Id", - "PartInventoryList": "Part inventory", + "PartInventoryDataList": "Part inventory", "PartInventoryTransaction": "Inventory transaction", "PartInventoryTransactionDescription": "Description", "PartInventoryTransactionEntryDate": "Date", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index 26ab2b5e..6f80ebd3 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -712,7 +712,7 @@ "PartInventoryAdjustment": "Ajuste inventario de piezas", "PartInventoryBalance": "Disponible", "PartInventoryId": "ID de inventario", - "PartInventoryList": "Inventario de piezas", + "PartInventoryDataList": "Inventario de piezas", "PartInventoryTransaction": "Transacción de inventario", "PartInventoryTransactionDescription": "Descripción", "PartInventoryTransactionEntryDate": "Fecha", diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index 68e86a80..d1d86d48 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -712,7 +712,7 @@ "PartInventoryAdjustment": "Ajustement de stock de pièces", "PartInventoryBalance": "Disponible", "PartInventoryId": "ID d'inventaire", - "PartInventoryList": "Inventaire des pièces", + "PartInventoryDataList": "Inventaire des pièces", "PartInventoryTransaction": "Transaction d'inventaire", "PartInventoryTransactionDescription": "La description", "PartInventoryTransactionEntryDate": "Date", diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt index c0e7a6b0..41163354 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt @@ -1 +1 @@ -{"Name":"z_ayGroupByTag group inventory by Tag","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
{{ayServerMetaData.CompanyName}} {{ayT 'PartInventoryList'}}
 
{{ayT 'Part'}}{{ayT 'PartWarehouse'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartInventoryBalance'}}Actual CountDifference + / (-)
{{count}} {{ayT 'PartList'}} with {{ayT 'Tag'}} {{group}}
{{PartName}}{{PartWarehouseName}}{{PartTags}} {{ayCurrency PartRetail}}{{OnHandQty}}
 
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n\n\n\n\n\n\t
\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n font-size: 9pt;\n }\n\nth {\n height: 20px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n \n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}","JsPrerender":"async function ayPrepareData(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartList\", \"PartInventoryList\", \"PartRetail\", \"PartInventoryBalance\", \"PartSerialNumbersAvailable\", \"Tag\", \"Tags\", \"PartWarehouse\" ]);\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData, '');\n\n //an example of ayGroupByTag to return records that contain 'zone' as a tag - comment out any others so only one ayGroupByTag \n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n//NOTE that tags are referred to as PartTags so this custom Prepare must reference PartTags, not Tags\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.PartTags && o.PartTags.length) {\n //loop through all tags for this record\n o.PartTags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_ayGroupByTag group inventory by Tag","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
{{ayServerMetaData.CompanyName}} {{ayT 'PartInventoryDataList'}}
 
{{ayT 'Part'}}{{ayT 'PartWarehouse'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartInventoryBalance'}}Actual CountDifference + / (-)
{{count}} {{ayT 'PartList'}} with {{ayT 'Tag'}} {{group}}
{{PartName}}{{PartWarehouseName}}{{PartTags}} {{ayCurrency PartRetail}}{{OnHandQty}}
 
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n\n\n\n\n\n\t
\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n font-size: 9pt;\n }\n\nth {\n height: 20px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n \n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}","JsPrerender":"async function ayPrepareData(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartList\", \"PartInventoryDataList\", \"PartRetail\", \"PartInventoryBalance\", \"PartSerialNumbersAvailable\", \"Tag\", \"Tags\", \"PartWarehouse\" ]);\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData, '');\n\n //an example of ayGroupByTag to return records that contain 'zone' as a tag - comment out any others so only one ayGroupByTag \n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n//NOTE that tags are referred to as PartTags so this custom Prepare must reference PartTags, not Tags\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.PartTags && o.PartTags.length) {\n //loop through all tags for this record\n o.PartTags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index b45f1d0d..b8269c66 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -459,6 +459,7 @@ BEGIN when 87 then aytkey= 'WorkOrderItemTravel'; when 88 then aytkey= 'WorkOrderItemUnit'; when 89 then aytkey= 'WorkOrderItemOutsideService'; + when 90 then aytkey= 'PartInventoryDataList'; else RETURN returnstr; end case;