+ $due_date = $this->due_date;
+ $this->trans_type = get_parent_type($this->trans_type);
+
+ $this->reference = 'auto';
+ $trans_no = $this->write(1);
+
+ // re-read parent document converting it to child
+ $this->read($this->trans_type, $trans_no, true);