Skip to main content

Managerul de magazin comandă marfă

Data mapping

The suppliers for a product are distinct for each facility. There is a party for each Facility. Suppliers are stored in mantle.product.ProductPrice, using the following fields:

  • productPriceId: supplierId+"_"+productId+"_"+facilityPartyId
  • productId: productId
  • vendorPartyId: supplierId
  • customerPartyId: facilityPartyId
  • priceTypeEnumId: "PptCurrent"
  • pricePurposeEnumId: "PppPurchase"
  • price: price
  • priceUomId: "RON"
  • preferredOrderEnumId: "SpoMain" or "SpoAlternate"
  • otherPartyItemId: supplierProductId
  • otherPartyItemName: supplierProductName

Product Pareto category is stored as:

mantle.product.category.ProductCategoryMember
  • productCategoryId: facilityPartyId+paretoCategory (eg.: L2A)
  • productId: productId
mantle.product.category.ProductCategory
  • productCategoryId: facilityPartyId+paretoCategory (eg.: L2A)
  • productCategoryTypeEnumId: PctPareto
  • categoryName: "Colibri Pareto A"
  • ownerPartyId: L2

Products that should be kept in stock and replenished when sold are stored as:

mantle.product.Product
  • requireInventory: Y or null
mantle.facility.ProductFacility:
  • productId: productId
  • facilityId: facilityId
  • minimumStock: minimumStock

Product ordering requirements are stored as:

mantle.request.requirement.Requirement
  • requirementTypeEnumId: RqTpInventory
  • statusId: statusId
  • facilityId: facilityId ?: ec.user.getPreference('FacilityActive') ?: ec.user.getPreference('FacilityGeneralDefault')
  • productId: productId
  • quantity: quantity
  • description: supplier.organizationName

Screen outline

Necesar

  • search widgets
  • table
    • cod
    • denumire
    • UM
    • pareto
    • ultimul preț achiziție fără TVA
    • preț vânzare
    • furnizori
    • stocAchCuTVA (hidden)
    • DIO(zile epuizare stoc) (hidden)
    • stocAchCuTVA * DIO (hidden)
    • stocMinim
    • stoc L1
    • stoc L2
    • comanda recomandată L2
    • comenzi furnizor L2
    • adauga
  • refresh button

Aproba

  • search widgets
  • Comanda
  • Delete
  • table
    • Cod
    • Denumire
    • UM
    • ULPfTVA
    • preț vânzare
    • Furnizori
    • Necesar
  • Comanda popup
    • furnizor
    • trimite pe

Comenzi

  • search widgets
  • Delete
  • table
    • Cod
    • Denumire
    • UM
    • Furnizor
    • Comandat

Screen data mapping

Necesar

Table Products WHERE Product.ACTIV_FIELD = true AND Product.HIDE_WHEN_ORDERING_FIELD = false
mantle.product.ProductPrices WHERE requireInventory = Y/null AND customerPartyId = this gestiune partyId(L2)
AND priceTypeEnumId = PptCurrent AND pricePurposeEnumId = PppPurchase
cod Product.BARCODE_FIELD
denumire Product.NAME_FIELD
UM Product.UOM_FIELD

Pareto

mantle.product.category.ProductCategoryMember.productCategoryId
ultimul preț achiziție fără TVA Product.LAST_BUYING_PRICE_FIELD
preț vânzare Product.PRICE_FIELD

furnizori

Organization.organizationName from ProductPrice.vendorPartyId WHERE preferredOrderEnumId = SpoMain

stocAchCuTVA product.stocLX * lastBuyingPriceWithVAT
DIO

stocAchCuTVA / dailyCogs

dailyCogs = (Product.getTotalSalesPeUltimulAn - Product.getTotalProfitPeUltimulAn) / 250(zile lucratoare in an)

stocMinim

PF.minimumStock

ProductFacility PF where PF.facilityId = gest.id AND PF.productId = product.id

For each gestiune  
stoc gest.getImportName p.stoc(gest)
   
comanda recomandată L2 PF.minimumStock-p.stoc(gest) ?. p.recommendedOrder(gest)
comenzi furnizor L2

SUM(R.quantity) mantle.request.requirement.Requirements R WHERE R.productId = product.id

adauga new Requirement with statusId = RqmtStCreated

Aproba

Table

Requirements R WHERE R.statusId = RqmtStCreated AND R.facilityId = L2
JOIN Product P
JOIN ProductPrice PP

Cod P.BARCODE_FIELD
Denumire P.NAME_FIELD
UM P.UOM_FIELD
ULPfTVA P.LAST_BUYING_PRICE_FIELD
preț vânzare P.PRICE_FIELD
Furnizori

Organization.organizationNames from PP.vendorPartyId
ORDER BY PP.preferredOrderEnumId, PP.price

Necesar R.quantity
Comanda popup

Selected rows R

furnizor(S) Auto select most common supplier from selected rows
trimite pe

Update on Supplier change
Printeaza, ${PartyContactMech PCM WHERE PCM.contactMechPurposeId = 'PhoneShippingOrigin'},
IF supplier is internal organization THEN Transfera

Comenzi

Table

Requirements R WHERE R.statusId = RqmtStOrdered AND R.facilityId = L2
JOIN Product P

Cod P.BARCODE_FIELD
Denumire P.NAME_FIELD
UM P.UOM_FIELD
Furnizor R.description
Comandat R.quantity