$cohead->find();
while ($cohead->fetch()){
- $this->log("Voiding Sales Order : {$cohead->cohead_number}");
+ $co = clone ($cohead);
- $cohead->clear($this);
+ $this->log("Voiding Sales Order : {$co->cohead_number}");
+
+ $co->clear($this);
}
$pohead->find();
while ($pohead->fetch()){
- $this->log("Voiding Sales Order : {$pohead->pohead_number}");
+ $po = clone ($pohead);
+
+ $this->log("Voiding Purchase Order : {$po->pohead_number}");
- $pohead->clear($this);
+ $po->clear($this);
}
- $this->jerr('DONE');
+ $this->jok('DONE');
+
exit;
}