PdcCalculation.ChangeDeliveryDate: Difference between revisions

From External Bemet Wiki
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 ==
Two possible situations:
Two possible situations:<br>
1. The calculation is in production: The delivery date of the calculation is changed to the new date and also the reservations, purchase lines and more are moved to the new date (The same functionality like PdC). All children are also changed, but with a calculated delivery date based on NewDate, materials and operations. Is a child calculation not in production, it is skipped.
1. The calculation is in production: The delivery date of the calculation is changed to the new date and also the reservations, purchase lines and more are moved to the new date (The same functionality like PdC). All children are also changed, but with a calculated delivery date based on NewDate, materials and operations (Inclusive reservations, purchase lines and more). Is a child calculation not in production, it is skipped.<br>
2. The calculation is not in production: The delivery date of the calculation is changed to the new date and also the reservations, purchase lines and more are moved to the new date (The same functionality like PdC). All children are also changed, but with a calculated delivery date based on NewDate, materials and operations. Is a child calculation not in production, it is skipped.
2. The calculation is not in production: The delivery date of the calculation is changed to the new date. All children are also changed, but with a calculated delivery date based on NewDate, materials and operations. Is a child calculation in production, it is skipped.<br>
 
<br>
NewDate: The NewDate value is the new delivery date.
Parameters:<br>
ChangeCode: The identifying value for the change of the delivery date.
NewDate: The NewDate value is the new delivery date.<br>
ChangeCode: The identifying value for the change of the delivery date.<br>


== Code example ==
== Code example ==
This code checks the levels of the whole bill of material.
This code changes the delivery date of calculation "01281" to 8-10-2015.


<source lang="vb">
<source lang="vb">

Latest revision as of 10:26, 3 June 2014

Declaration

ChangeDeliveryDate(NewDate as Date, ChangeCode as String) as Boolean

Description

This method changes the delivery date of a calculation.

Notes

Two possible situations:
1. The calculation is in production: The delivery date of the calculation is changed to the new date and also the reservations, purchase lines and more are moved to the new date (The same functionality like PdC). All children are also changed, but with a calculated delivery date based on NewDate, materials and operations (Inclusive reservations, purchase lines and more). Is a child calculation not in production, it is skipped.
2. The calculation is not in production: The delivery date of the calculation is changed to the new date. All children are also changed, but with a calculated delivery date based on NewDate, materials and operations. Is a child calculation in production, it is skipped.

Parameters:
NewDate: The NewDate value is the new delivery date.
ChangeCode: The identifying value for the change of the delivery date.

Code example

This code changes the delivery date of calculation "01281" to 8-10-2015.

dim objCalc

 set objCalc= pdc.OpenCalculation("01281")
 if objCalc.changedeliverydate(CDate("2015-10-08"), "KL") then
   msgbox "OK"
 else
   msgbox pdc.LastError
 end if
 objCalc.Save
 objCalc.show

Availability

Available since 3 June 2014 (Version 4.3 onwards).