This commit is contained in:
@@ -190,22 +190,32 @@ group by partid, partwarehouseid
|
||||
|
||||
|
||||
--VRESTOCKREQUIRED
|
||||
create view vrestockrequired as select
|
||||
apart.id as partid, apartwarehouse.id as partwarehouseid, apart.partnumber, apartwarehouse.name as displaywarehouse, apartstocklevel.minimumquantity, vpartinventorynow.balance,
|
||||
coalesce(vpartsonorder.quantityonorder,0) as onorderquantity,
|
||||
apartstocklevel.minimumquantity - (coalesce(vpartinventorynow.balance, 0) + coalesce(vpartsonorder.quantityonorder, 0)) as requiredquantity
|
||||
from
|
||||
vpartinventorynow
|
||||
left join apart on vpartinventorynow.partid=apart.id
|
||||
left join apartwarehouse on vpartinventorynow.partwarehouseid = apartwarehouse.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) + coalesce(vpartsonorder.quantityonorder, 0))) >0
|
||||
order by
|
||||
requiredquantity desc
|
||||
create view vrestockrequired as SELECT apart.id AS partid,
|
||||
apartwarehouse.id AS partwarehouseid,
|
||||
apart.partnumber,
|
||||
apartwarehouse.name AS displaywarehouse,
|
||||
|
||||
amanufacturer.id as manufactureid,
|
||||
amanufacturer.name as displaymanufacturer,
|
||||
awholesaler.id as wholesalerid,
|
||||
awholesaler.name as displaywholesaler,
|
||||
aalternativewholesaler.id as ayalternativewholesalerid,
|
||||
aalternativewholesaler.name as displayalternativewholesaler,
|
||||
|
||||
apartstocklevel.minimumquantity,
|
||||
vpartinventorynow.balance,
|
||||
COALESCE(vpartsonorder.quantityonorder, (0)::numeric) AS onorderquantity,
|
||||
(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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ export default {
|
||||
case window.$gz.type.Project:
|
||||
return "$ayiLayerGroup";
|
||||
case window.$gz.type.PurchaseOrder:
|
||||
return "$ayiDollyFlatbed";
|
||||
return "$ayiTruckLoading";
|
||||
case window.$gz.type.Quote:
|
||||
return "$ayiPencilAlt";
|
||||
case window.$gz.type.QuoteItem:
|
||||
@@ -444,7 +444,7 @@ export default {
|
||||
case window.$gz.type.WorkOrderItemPart:
|
||||
return "$ayiBoxes";
|
||||
case window.$gz.type.WorkOrderItemPartRequest:
|
||||
return "$ayiPaperPlane";
|
||||
return "$ayiParachuteBox";
|
||||
case window.$gz.type.WorkOrderItemScheduledUser:
|
||||
return "$ayiUserClock";
|
||||
case window.$gz.type.WorkOrderItemTask:
|
||||
|
||||
@@ -375,12 +375,12 @@ function initNavPanel() {
|
||||
});
|
||||
}
|
||||
|
||||
//PART ASSEMBLIES
|
||||
if (window.$gz.role.canOpen(window.$gz.type.PartAssembly)) {
|
||||
//PURCHASE ORDERS
|
||||
if (useInventory && window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) {
|
||||
sub.push({
|
||||
title: "PartAssemblyList",
|
||||
icon: "$ayiObjectGroup",
|
||||
route: "/inv-part-assemblies",
|
||||
title: "InventoryPurchaseOrders",
|
||||
icon: "$ayiTruckLoading",
|
||||
route: "/inv-purchase-orders",
|
||||
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
|
||||
if (
|
||||
useInventory &&
|
||||
@@ -402,46 +425,30 @@ function initNavPanel() {
|
||||
) {
|
||||
sub.push({
|
||||
title: "WorkOrderItemPartRequestList",
|
||||
icon: "$ayiPaperPlane",
|
||||
icon: "$ayiParachuteBox",
|
||||
route: "/inv-part-requests",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
|
||||
//PURCHASE ORDERS
|
||||
if (useInventory && window.$gz.role.canOpen(window.$gz.type.PurchaseOrder)) {
|
||||
//PART ASSEMBLIES
|
||||
if (window.$gz.role.canOpen(window.$gz.type.PartAssembly)) {
|
||||
sub.push({
|
||||
title: "InventoryPurchaseOrders",
|
||||
icon: "$ayiDollyFlatbed",
|
||||
route: "/inv-purchase-orders",
|
||||
title: "PartAssemblyList",
|
||||
icon: "$ayiObjectGroup",
|
||||
route: "/inv-part-assemblies",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
|
||||
//ADJUSTMENTS
|
||||
if (
|
||||
useInventory &&
|
||||
window.$gz.role.canOpen(window.$gz.type.PartInventory)
|
||||
) {
|
||||
sub.push({
|
||||
title: "PartInventoryTransactionList",
|
||||
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++
|
||||
});
|
||||
}
|
||||
//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)
|
||||
|
||||
@@ -157,6 +157,7 @@ export default {
|
||||
"InventoryPurchaseOrders",
|
||||
"PartInventoryTransactionList",
|
||||
"PartWarehouseList",
|
||||
"PurchaseOrderUIRestockList",
|
||||
"WidgetList",
|
||||
"VendorList",
|
||||
"AdministrationGlobalSettings",
|
||||
|
||||
@@ -49,6 +49,7 @@ import {
|
||||
faChevronRight,
|
||||
faCircle,
|
||||
faClipboard,
|
||||
faClipboardList,
|
||||
faClock,
|
||||
faClone,
|
||||
faCode,
|
||||
@@ -68,6 +69,7 @@ import {
|
||||
faEgg,
|
||||
faEllipsisV,
|
||||
faEnvelopeOpenText,
|
||||
faExchangeAlt,
|
||||
faExclamation,
|
||||
faExclamationCircle,
|
||||
faExclamationTriangle,
|
||||
@@ -124,7 +126,8 @@ import {
|
||||
faObjectGroup,
|
||||
faPallet,
|
||||
faPaperclip,
|
||||
faPaperPlane,
|
||||
//faPaperPlane,
|
||||
faParachuteBox,
|
||||
faPencilAlt,
|
||||
faPencilRuler,
|
||||
faPeopleCarry,
|
||||
@@ -176,6 +179,7 @@ import {
|
||||
faToolbox,
|
||||
faTools,
|
||||
faTrashAlt,
|
||||
faTruckLoading,
|
||||
faTruckMonster,
|
||||
faUndo,
|
||||
faUser,
|
||||
@@ -219,6 +223,7 @@ library.add(
|
||||
faChevronLeft,
|
||||
faChevronRight,
|
||||
faClipboard,
|
||||
faClipboardList,
|
||||
faCircle,
|
||||
farCircle,
|
||||
faClock,
|
||||
@@ -241,6 +246,7 @@ library.add(
|
||||
faEgg,
|
||||
faEllipsisV,
|
||||
faEnvelopeOpenText,
|
||||
faExchangeAlt,
|
||||
faExclamation,
|
||||
faExclamationCircle,
|
||||
faExclamationTriangle,
|
||||
@@ -297,7 +303,8 @@ library.add(
|
||||
faObjectGroup,
|
||||
faPallet,
|
||||
faPaperclip,
|
||||
faPaperPlane,
|
||||
//faPaperPlane,
|
||||
faParachuteBox,
|
||||
faPencilAlt,
|
||||
faPencilRuler,
|
||||
faPeopleCarry,
|
||||
@@ -350,6 +357,7 @@ library.add(
|
||||
faToolbox,
|
||||
faTools,
|
||||
faTrashAlt,
|
||||
faTruckLoading,
|
||||
faTruckMonster,
|
||||
faUndo,
|
||||
faUser,
|
||||
@@ -502,6 +510,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "clipboard"]
|
||||
}
|
||||
},
|
||||
ayiClipboardList: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "clipboard-list"]
|
||||
}
|
||||
},
|
||||
ayiClock: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
@@ -616,6 +630,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "envelope-open-text"]
|
||||
}
|
||||
},
|
||||
ayiExchangeAlt: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "exchange-alt"]
|
||||
}
|
||||
},
|
||||
ayiExclamationCircle: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
@@ -946,10 +966,16 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "paperclip"]
|
||||
}
|
||||
},
|
||||
ayiPaperPlane: {
|
||||
// ayiPaperPlane: {
|
||||
// component: FontAwesomeIcon,
|
||||
// props: {
|
||||
// icon: ["fas", "paper-plane"]
|
||||
// }
|
||||
// },
|
||||
ayiParachuteBox: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "paper-plane"]
|
||||
icon: ["fas", "parachute-box"]
|
||||
}
|
||||
},
|
||||
ayiPencilAlt: {
|
||||
@@ -1252,6 +1278,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "trash-alt"]
|
||||
}
|
||||
},
|
||||
ayiTruckLoading: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "truck-loading"]
|
||||
}
|
||||
},
|
||||
ayiTruckMonster: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
|
||||
@@ -316,7 +316,7 @@ function generateMenu(vm) {
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "MoveSelected",
|
||||
icon: "$ayiPeopleCarry",
|
||||
icon: "$ayiExchangeAlt",
|
||||
surface: false,
|
||||
key: FORM_KEY + ":MOVE_SELECTED",
|
||||
vm: vm
|
||||
|
||||
@@ -278,7 +278,7 @@ function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: false,
|
||||
readOnly: vm.formState.readOnly,
|
||||
icon: "$ayiDolly",
|
||||
icon: "$ayiPeopleCarry",
|
||||
title: "PartInventoryAdjustment",
|
||||
helpUrl: "inv-part-inventory-transactions",
|
||||
formData: {
|
||||
|
||||
@@ -137,7 +137,7 @@ async function clickHandler(menuItem) {
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$ayiDolly",
|
||||
icon: "$ayiPeopleCarry",
|
||||
title: "PartInventoryTransactionList",
|
||||
helpUrl: "inv-part-inventory-transactions",
|
||||
menuItems: [],
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
beforeCreate() {
|
||||
window.$gz.eventBus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "$ayiPaperPlane",
|
||||
icon: "$ayiParachuteBox",
|
||||
title: "WorkOrderItemPartRequestList",
|
||||
helpUrl: "inv-part-requests"
|
||||
});
|
||||
|
||||
21
ayanova/src/views/inv-part-restocks.vue
Normal file
21
ayanova/src/views/inv-part-restocks.vue
Normal 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>
|
||||
@@ -610,7 +610,7 @@ function generateMenu(vm) {
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "PartInventoryTransactionList",
|
||||
icon: "$ayiDolly",
|
||||
icon: "$ayiPeopleCarry",
|
||||
key: FORM_KEY + ":PartInventoryTransactionList",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
@@ -833,7 +833,7 @@ function generateMenu(vm) {
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "PartInventoryTransactionList",
|
||||
icon: "$ayiDolly",
|
||||
icon: "$ayiPeopleCarry",
|
||||
key: FORM_KEY + ":PartInventoryTransactionList",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
@@ -1399,7 +1399,7 @@ function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: false,
|
||||
readOnly: vm.formState.readOnly,
|
||||
icon: "$ayiDollyFlatbed",
|
||||
icon: "$ayiTruckLoading",
|
||||
title: "PurchaseOrder",
|
||||
helpUrl: "inv-purchase-orders",
|
||||
formData: {
|
||||
|
||||
@@ -119,7 +119,7 @@ async function clickHandler(menuItem) {
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$ayiDollyFlatbed",
|
||||
icon: "$ayiTruckLoading",
|
||||
title: "InventoryPurchaseOrders",
|
||||
helpUrl: "inv-purchase-orders",
|
||||
menuItems: [],
|
||||
|
||||
Reference in New Issue
Block a user