This commit is contained in:
2021-02-26 19:30:14 +00:00
parent 6b59585c89
commit 80133e98f2
14 changed files with 137 additions and 66 deletions

View File

@@ -190,22 +190,32 @@ group by partid, partwarehouseid
--VRESTOCKREQUIRED --VRESTOCKREQUIRED
create view vrestockrequired as select create view vrestockrequired as SELECT apart.id AS partid,
apart.id as partid, apartwarehouse.id as partwarehouseid, apart.partnumber, apartwarehouse.name as displaywarehouse, apartstocklevel.minimumquantity, vpartinventorynow.balance, apartwarehouse.id AS partwarehouseid,
coalesce(vpartsonorder.quantityonorder,0) as onorderquantity, apart.partnumber,
apartstocklevel.minimumquantity - (coalesce(vpartinventorynow.balance, 0) + coalesce(vpartsonorder.quantityonorder, 0)) as requiredquantity apartwarehouse.name AS displaywarehouse,
from
vpartinventorynow amanufacturer.id as manufactureid,
left join apart on vpartinventorynow.partid=apart.id amanufacturer.name as displaymanufacturer,
left join apartwarehouse on vpartinventorynow.partwarehouseid = apartwarehouse.id awholesaler.id as wholesalerid,
left join apartstocklevel on vpartinventorynow.partid=apartstocklevel.partid and vpartinventorynow.partwarehouseid=apartstocklevel.partwarehouseid awholesaler.name as displaywholesaler,
left join vpartsonorder on vpartinventorynow.partid=vpartsonorder.partid and vpartinventorynow.partwarehouseid=vpartsonorder.partwarehouseid aalternativewholesaler.id as ayalternativewholesalerid,
where aalternativewholesaler.name as displayalternativewholesaler,
apartstocklevel.minimumquantity is not null
and apartstocklevel.minimumquantity,
(apartstocklevel.minimumquantity - (coalesce(vpartinventorynow.balance, 0) + coalesce(vpartsonorder.quantityonorder, 0))) >0 vpartinventorynow.balance,
order by COALESCE(vpartsonorder.quantityonorder, (0)::numeric) AS onorderquantity,
requiredquantity desc (apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, (0)::numeric) + COALESCE(vpartsonorder.quantityonorder, (0)::numeric))) AS requiredquantity
FROM ((((vpartinventorynow
LEFT JOIN apart ON ((vpartinventorynow.partid = apart.id)))
LEFT JOIN apartwarehouse ON ((vpartinventorynow.partwarehouseid = apartwarehouse.id)))
left join avendor as amanufacturer on (apart.manufacturerid = amanufacturer.id)
left join avendor as awholesaler on (apart.wholesalerid = awholesaler.id)
left join avendor as aalternativewholesaler on (apart.alternativewholesalerid = aalternativewholesaler.id)
LEFT JOIN apartstocklevel ON (((vpartinventorynow.partid = apartstocklevel.partid) AND (vpartinventorynow.partwarehouseid = apartstocklevel.partwarehouseid))))
LEFT JOIN vpartsonorder ON (((vpartinventorynow.partid = vpartsonorder.partid) AND (vpartinventorynow.partwarehouseid = vpartsonorder.partwarehouseid))))
WHERE ((apartstocklevel.minimumquantity IS NOT NULL) AND ((apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, (0)::numeric) + COALESCE(vpartsonorder.quantityonorder, (0)::numeric))) > (0)::numeric))
ORDER BY (apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, (0)::numeric) + COALESCE(vpartsonorder.quantityonorder, (0)::numeric))) DESC;

View File

@@ -416,7 +416,7 @@ export default {
case window.$gz.type.Project: case window.$gz.type.Project:
return "$ayiLayerGroup"; return "$ayiLayerGroup";
case window.$gz.type.PurchaseOrder: case window.$gz.type.PurchaseOrder:
return "$ayiDollyFlatbed"; return "$ayiTruckLoading";
case window.$gz.type.Quote: case window.$gz.type.Quote:
return "$ayiPencilAlt"; return "$ayiPencilAlt";
case window.$gz.type.QuoteItem: case window.$gz.type.QuoteItem:
@@ -444,7 +444,7 @@ export default {
case window.$gz.type.WorkOrderItemPart: case window.$gz.type.WorkOrderItemPart:
return "$ayiBoxes"; return "$ayiBoxes";
case window.$gz.type.WorkOrderItemPartRequest: case window.$gz.type.WorkOrderItemPartRequest:
return "$ayiPaperPlane"; return "$ayiParachuteBox";
case window.$gz.type.WorkOrderItemScheduledUser: case window.$gz.type.WorkOrderItemScheduledUser:
return "$ayiUserClock"; return "$ayiUserClock";
case window.$gz.type.WorkOrderItemTask: case window.$gz.type.WorkOrderItemTask:

View File

@@ -375,12 +375,12 @@ function initNavPanel() {
}); });
} }
//PART ASSEMBLIES //PURCHASE ORDERS
if (window.$gz.role.canOpen(window.$gz.type.PartAssembly)) { if (useInventory && window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) {
sub.push({ sub.push({
title: "PartAssemblyList", title: "InventoryPurchaseOrders",
icon: "$ayiObjectGroup", icon: "$ayiTruckLoading",
route: "/inv-part-assemblies", route: "/inv-purchase-orders",
key: key++ key: key++
}); });
} }
@@ -395,6 +395,29 @@ function initNavPanel() {
}); });
} }
//INVENTORY TRANSACTIONS
if (useInventory && window.$gz.role.canOpen(window.$gz.type.PartInventory)) {
sub.push({
title: "PartInventoryTransactionList",
icon: "$ayiPeopleCarry",
route: "/inv-part-inventory-transactions",
key: key++
});
}
//RESTOCK REQUIRED
if (
useInventory &&
window.$gz.role.canOpen(window.$gz.type.WorkOrderItemPartRequest)
) {
sub.push({
title: "PurchaseOrderUIRestockList",
icon: "$ayiClipboardList",
route: "/inv-part-restocks",
key: key++
});
}
//PART REQUESTS //PART REQUESTS
if ( if (
useInventory && useInventory &&
@@ -402,46 +425,30 @@ function initNavPanel() {
) { ) {
sub.push({ sub.push({
title: "WorkOrderItemPartRequestList", title: "WorkOrderItemPartRequestList",
icon: "$ayiPaperPlane", icon: "$ayiParachuteBox",
route: "/inv-part-requests", route: "/inv-part-requests",
key: key++ key: key++
}); });
} }
//PURCHASE ORDERS //PART ASSEMBLIES
if (useInventory && window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) { if (window.$gz.role.canOpen(window.$gz.type.PartAssembly)) {
sub.push({ sub.push({
title: "InventoryPurchaseOrders", title: "PartAssemblyList",
icon: "$ayiDollyFlatbed", icon: "$ayiObjectGroup",
route: "/inv-purchase-orders", route: "/inv-part-assemblies",
key: key++ key: key++
}); });
}
//ADJUSTMENTS //WAREHOUSES
if ( if (useInventory && window.$gz.role.canOpen(window.$gz.type.PartWarehouse)) {
useInventory && sub.push({
window.$gz.role.canOpen(window.$gz.type.PartInventory) title: "PartWarehouseList",
) { icon: "$ayiWarehouse",
sub.push({ route: "/inv-part-warehouses",
title: "PartInventoryTransactionList", key: key++
icon: "$ayiDolly", });
route: "/inv-part-inventory-transactions",
key: key++
});
}
//WAREHOUSES
if (
useInventory &&
window.$gz.role.canOpen(window.$gz.type.PartWarehouse)
) {
sub.push({
title: "PartWarehouseList",
icon: "$ayiWarehouse",
route: "/inv-part-warehouses",
key: key++
});
}
} }
//**** INVENTORY (TOP GROUP) //**** INVENTORY (TOP GROUP)

View File

@@ -157,6 +157,7 @@ export default {
"InventoryPurchaseOrders", "InventoryPurchaseOrders",
"PartInventoryTransactionList", "PartInventoryTransactionList",
"PartWarehouseList", "PartWarehouseList",
"PurchaseOrderUIRestockList",
"WidgetList", "WidgetList",
"VendorList", "VendorList",
"AdministrationGlobalSettings", "AdministrationGlobalSettings",

View File

@@ -49,6 +49,7 @@ import {
faChevronRight, faChevronRight,
faCircle, faCircle,
faClipboard, faClipboard,
faClipboardList,
faClock, faClock,
faClone, faClone,
faCode, faCode,
@@ -68,6 +69,7 @@ import {
faEgg, faEgg,
faEllipsisV, faEllipsisV,
faEnvelopeOpenText, faEnvelopeOpenText,
faExchangeAlt,
faExclamation, faExclamation,
faExclamationCircle, faExclamationCircle,
faExclamationTriangle, faExclamationTriangle,
@@ -124,7 +126,8 @@ import {
faObjectGroup, faObjectGroup,
faPallet, faPallet,
faPaperclip, faPaperclip,
faPaperPlane, //faPaperPlane,
faParachuteBox,
faPencilAlt, faPencilAlt,
faPencilRuler, faPencilRuler,
faPeopleCarry, faPeopleCarry,
@@ -176,6 +179,7 @@ import {
faToolbox, faToolbox,
faTools, faTools,
faTrashAlt, faTrashAlt,
faTruckLoading,
faTruckMonster, faTruckMonster,
faUndo, faUndo,
faUser, faUser,
@@ -219,6 +223,7 @@ library.add(
faChevronLeft, faChevronLeft,
faChevronRight, faChevronRight,
faClipboard, faClipboard,
faClipboardList,
faCircle, faCircle,
farCircle, farCircle,
faClock, faClock,
@@ -241,6 +246,7 @@ library.add(
faEgg, faEgg,
faEllipsisV, faEllipsisV,
faEnvelopeOpenText, faEnvelopeOpenText,
faExchangeAlt,
faExclamation, faExclamation,
faExclamationCircle, faExclamationCircle,
faExclamationTriangle, faExclamationTriangle,
@@ -297,7 +303,8 @@ library.add(
faObjectGroup, faObjectGroup,
faPallet, faPallet,
faPaperclip, faPaperclip,
faPaperPlane, //faPaperPlane,
faParachuteBox,
faPencilAlt, faPencilAlt,
faPencilRuler, faPencilRuler,
faPeopleCarry, faPeopleCarry,
@@ -350,6 +357,7 @@ library.add(
faToolbox, faToolbox,
faTools, faTools,
faTrashAlt, faTrashAlt,
faTruckLoading,
faTruckMonster, faTruckMonster,
faUndo, faUndo,
faUser, faUser,
@@ -502,6 +510,12 @@ const CUSTOM_ICONS = {
icon: ["fas", "clipboard"] icon: ["fas", "clipboard"]
} }
}, },
ayiClipboardList: {
component: FontAwesomeIcon,
props: {
icon: ["fas", "clipboard-list"]
}
},
ayiClock: { ayiClock: {
component: FontAwesomeIcon, component: FontAwesomeIcon,
props: { props: {
@@ -616,6 +630,12 @@ const CUSTOM_ICONS = {
icon: ["fas", "envelope-open-text"] icon: ["fas", "envelope-open-text"]
} }
}, },
ayiExchangeAlt: {
component: FontAwesomeIcon,
props: {
icon: ["fas", "exchange-alt"]
}
},
ayiExclamationCircle: { ayiExclamationCircle: {
component: FontAwesomeIcon, component: FontAwesomeIcon,
props: { props: {
@@ -946,10 +966,16 @@ const CUSTOM_ICONS = {
icon: ["fas", "paperclip"] icon: ["fas", "paperclip"]
} }
}, },
ayiPaperPlane: { // ayiPaperPlane: {
// component: FontAwesomeIcon,
// props: {
// icon: ["fas", "paper-plane"]
// }
// },
ayiParachuteBox: {
component: FontAwesomeIcon, component: FontAwesomeIcon,
props: { props: {
icon: ["fas", "paper-plane"] icon: ["fas", "parachute-box"]
} }
}, },
ayiPencilAlt: { ayiPencilAlt: {
@@ -1252,6 +1278,12 @@ const CUSTOM_ICONS = {
icon: ["fas", "trash-alt"] icon: ["fas", "trash-alt"]
} }
}, },
ayiTruckLoading: {
component: FontAwesomeIcon,
props: {
icon: ["fas", "truck-loading"]
}
},
ayiTruckMonster: { ayiTruckMonster: {
component: FontAwesomeIcon, component: FontAwesomeIcon,
props: { props: {

View File

@@ -316,7 +316,7 @@ function generateMenu(vm) {
menuOptions.menuItems.push({ menuOptions.menuItems.push({
title: "MoveSelected", title: "MoveSelected",
icon: "$ayiPeopleCarry", icon: "$ayiExchangeAlt",
surface: false, surface: false,
key: FORM_KEY + ":MOVE_SELECTED", key: FORM_KEY + ":MOVE_SELECTED",
vm: vm vm: vm

View File

@@ -278,7 +278,7 @@ function generateMenu(vm) {
let menuOptions = { let menuOptions = {
isMain: false, isMain: false,
readOnly: vm.formState.readOnly, readOnly: vm.formState.readOnly,
icon: "$ayiDolly", icon: "$ayiPeopleCarry",
title: "PartInventoryAdjustment", title: "PartInventoryAdjustment",
helpUrl: "inv-part-inventory-transactions", helpUrl: "inv-part-inventory-transactions",
formData: { formData: {

View File

@@ -137,7 +137,7 @@ async function clickHandler(menuItem) {
function generateMenu(vm) { function generateMenu(vm) {
let menuOptions = { let menuOptions = {
isMain: true, isMain: true,
icon: "$ayiDolly", icon: "$ayiPeopleCarry",
title: "PartInventoryTransactionList", title: "PartInventoryTransactionList",
helpUrl: "inv-part-inventory-transactions", helpUrl: "inv-part-inventory-transactions",
menuItems: [], menuItems: [],

View File

@@ -12,7 +12,7 @@ export default {
beforeCreate() { beforeCreate() {
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$emit("menu-change", {
isMain: true, isMain: true,
icon: "$ayiPaperPlane", icon: "$ayiParachuteBox",
title: "WorkOrderItemPartRequestList", title: "WorkOrderItemPartRequestList",
helpUrl: "inv-part-requests" helpUrl: "inv-part-requests"
}); });

View File

@@ -0,0 +1,21 @@
<template>
<UnderConstruction data-cy="underconstruction" />
</template>
<script>
import UnderConstruction from "../components/underconstruction.vue";
export default {
components: {
UnderConstruction
},
beforeCreate() {
window.$gz.eventBus.$emit("menu-change", {
isMain: true,
icon: "$ayiClipboardList",
title: "PurchaseOrderUIRestockList",
helpUrl: "inv-part-restocks"
});
}
};
</script>

View File

@@ -610,7 +610,7 @@ function generateMenu(vm) {
menuOptions.menuItems.push({ menuOptions.menuItems.push({
title: "PartInventoryTransactionList", title: "PartInventoryTransactionList",
icon: "$ayiDolly", icon: "$ayiPeopleCarry",
key: FORM_KEY + ":PartInventoryTransactionList", key: FORM_KEY + ":PartInventoryTransactionList",
vm: vm vm: vm
}); });

View File

@@ -833,7 +833,7 @@ function generateMenu(vm) {
menuOptions.menuItems.push({ menuOptions.menuItems.push({
title: "PartInventoryTransactionList", title: "PartInventoryTransactionList",
icon: "$ayiDolly", icon: "$ayiPeopleCarry",
key: FORM_KEY + ":PartInventoryTransactionList", key: FORM_KEY + ":PartInventoryTransactionList",
vm: vm vm: vm
}); });

View File

@@ -1399,7 +1399,7 @@ function generateMenu(vm) {
let menuOptions = { let menuOptions = {
isMain: false, isMain: false,
readOnly: vm.formState.readOnly, readOnly: vm.formState.readOnly,
icon: "$ayiDollyFlatbed", icon: "$ayiTruckLoading",
title: "PurchaseOrder", title: "PurchaseOrder",
helpUrl: "inv-purchase-orders", helpUrl: "inv-purchase-orders",
formData: { formData: {

View File

@@ -119,7 +119,7 @@ async function clickHandler(menuItem) {
function generateMenu(vm) { function generateMenu(vm) {
let menuOptions = { let menuOptions = {
isMain: true, isMain: true,
icon: "$ayiDollyFlatbed", icon: "$ayiTruckLoading",
title: "InventoryPurchaseOrders", title: "InventoryPurchaseOrders",
helpUrl: "inv-purchase-orders", helpUrl: "inv-purchase-orders",
menuItems: [], menuItems: [],