PdcMasterData.ReduceStock

From External Bemet Wiki
Revision as of 13:06, 6 April 2016 by Mike (talk | contribs) (Created page with "== Declaration == PdcMasterData.ReduceStock(intLMV_ID as Integer,intQuantity as Integer,intVM_ID as Integer) == Description == This method reduces stock of a given LMV line ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

PdcMasterData.ReduceStock(intLMV_ID as Integer,intQuantity as Integer,intVM_ID as Integer)

Description

This method reduces stock of a given LMV line

Notes

Code example

This code example reduces the stock of LMV Line 161 with 0.1 and code ID1 (CORRECTION). If the LMV line is already in use, it returns an error msg.

Sub btnReduceStockClick(Sender)
dim strError

  if not fbooReduceStock(161, 0.1, 1, strError) then
    msgbox strError
  end if
End Sub


Function fbooReduceStock(rintLMV_ID, rintQuantity, rintVM_ID, rstrError)

  pdc.MasterData.ReduceStock rintLMV_ID, rintQuantity, rintVM_ID
  rstrError = pdc.LastError

  if rstrError = "" then
    fbooReduceStock = true
  else
    fbooReduceStock = false
  end if

End Function

Availability

5.2