<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.ecibemet.com/index.php?action=history&amp;feed=atom&amp;title=PdcAllocation.WriteOff</id>
	<title>PdcAllocation.WriteOff - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ecibemet.com/index.php?action=history&amp;feed=atom&amp;title=PdcAllocation.WriteOff"/>
	<link rel="alternate" type="text/html" href="http://wiki.ecibemet.com/index.php?title=PdcAllocation.WriteOff&amp;action=history"/>
	<updated>2026-05-06T18:14:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://wiki.ecibemet.com/index.php?title=PdcAllocation.WriteOff&amp;diff=2915&amp;oldid=prev</id>
		<title>Mike: Created page with &quot;== Declaration == WriteOff() as Boolean  == Description == Writes off the allocation in PdC.  == Notes == &#039;&#039;&#039;Important:&#039;&#039;&#039; Only materials with the write-off-setting set to Wri...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.ecibemet.com/index.php?title=PdcAllocation.WriteOff&amp;diff=2915&amp;oldid=prev"/>
		<updated>2017-04-25T14:03:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Declaration == WriteOff() as Boolean  == Description == Writes off the allocation in PdC.  == Notes == &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Only materials with the write-off-setting set to Wri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Declaration ==&lt;br /&gt;
WriteOff() as Boolean&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Writes off the allocation in PdC.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; Only materials with the write-off-setting set to WriteOffComplete can be written off using scripts. When changing this setting to WriteOffComplete, it has to be done before the calculation is given into production or else the material can’t be written of. &lt;br /&gt;
&lt;br /&gt;
The WriteOffComplete, WriteOffPropPreCalc and WriteOffPropRes properties have been made public on [[pdcMaterial|pdcMaterial]] in order to change them through scripting.&lt;br /&gt;
&lt;br /&gt;
== Code example ==&lt;br /&gt;
The following code example creates a new allocation and sets the properties. If the save goes wrong it will show the PDC.LastError.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
dim alloc&lt;br /&gt;
Set alloc = PDC.Logistics.Allocations.New&lt;br /&gt;
alloc.MaterialID = 2075&lt;br /&gt;
alloc.MaterialNo = &amp;quot;ASSY3 SCHAW10&amp;quot;&lt;br /&gt;
alloc.Quantity = 4&lt;br /&gt;
alloc.LMV_ID = 111&lt;br /&gt;
alloc.ReservationID = 357&lt;br /&gt;
alloc.UseExistingAlloc = False&lt;br /&gt;
&lt;br /&gt;
if alloc.Save() then&lt;br /&gt;
  Label1.Caption = alloc.ReservationID&lt;br /&gt;
else&lt;br /&gt;
  Label1.Caption = &amp;quot;error: &amp;quot; + PDC.LastError&lt;br /&gt;
end if &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
Available since May 2017 (from version 5.4)&lt;/div&gt;</summary>
		<author><name>Mike</name></author>
	</entry>
</feed>