PdcMaterial.StockToPurchase: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
== Notes == | == Notes == | ||
Change the material from 'write off from stock' to 'purchase on order'. | Change the material from 'write off from stock' to 'purchase on order'.<br> | ||
The result of the function is true when it is succesfully done.<br> | |||
An error occurs (Result = false):<br> | |||
1. The material is not stock.<br> | |||
2. The calculation is in production.<br> | |||
3. The material is not type M or K.<br> | |||
<br> | |||
The error is stored in [[pdcApplication.LastError]].<br> | |||
== Code example == | == Code example == | ||
<source lang="vb"> | <source lang="vb"> | ||
If Not oMat.StockToPurchase() Then | |||
MsgBox(PDC.App.LastError) | |||
End If | |||
</source> | </source> | ||
== Availability == | == Availability == |
Latest revision as of 07:34, 4 July 2025
Declaration
StockToPurchase as Boolean
Description
Change the material from 'write off from stock' to 'purchase on order' function.
Notes
Change the material from 'write off from stock' to 'purchase on order'.
The result of the function is true when it is succesfully done.
An error occurs (Result = false):
1. The material is not stock.
2. The calculation is in production.
3. The material is not type M or K.
The error is stored in pdcApplication.LastError.
Code example
If Not oMat.StockToPurchase() Then
MsgBox(PDC.App.LastError)
End If