PdcPuchaseInvoiceLineList.AddLineWithPO: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
set objPIL = objPIList.AddLineWithPO(strPONr, strPos, 0) | set objPIL = objPIList.AddLineWithPO(strPONr, strPos, 0) | ||
if IsValid(objPIL) then | if IsValid(objPIL) then | ||
mmo_Log.Lines.Add " | mmo_Log.Lines.Add "Line" & objPIL.Pos & " added(" & objPIL.ID & ")" & " CostKind = " & objPIL.CostKind | ||
else | else | ||
mmo_Log.Lines.Add pdc.LastError | mmo_Log.Lines.Add pdc.LastError | ||
Line 30: | Line 30: | ||
end if 'IsValid(objPIList) | end if 'IsValid(objPIList) | ||
else | else | ||
msgbox " | msgbox "Choose or create an purchase invoice." | ||
end if 'IsValid(objPI) | end if 'IsValid(objPI) | ||
</source> | </source> |
Revision as of 11:02, 19 August 2015
Declaration
AddLineWithPO(PONumber, POPosition as String, DeliveryID as Integer) as PdcPurchaseInvoiceLine Either enter PONumber and POPositions or enter DeliveryID.
Description
The method adds a purchase invoice line linked to a purchase order line or a delivery line.
Notes
Code example
dim objPIList
dim objPIL
dim strPONr
dim strPos
if IsValid(objPI) then
set objPIList = objPI.PurchaseInvoiceLineList
if IsValid(objPIList) then
strPONr = GetAnyField("TOTINKOOP", "IN_ID", edt_IN.Text, "IN_NR")
strPos = GetAnyField("TOTINKOOP", "IN_ID", edt_IN.Text, "IN_BPOS")
set objPIL = objPIList.AddLineWithPO(strPONr, strPos, 0)
if IsValid(objPIL) then
mmo_Log.Lines.Add "Line" & objPIL.Pos & " added(" & objPIL.ID & ")" & " CostKind = " & objPIL.CostKind
else
mmo_Log.Lines.Add pdc.LastError
end if 'IsValid(objPIL)
end if 'IsValid(objPIList)
else
msgbox "Choose or create an purchase invoice."
end if 'IsValid(objPI)
Availability
Available since July 2015 (Version 5.1 onwards)