+ $this->read($trans_type, $trans_no);
+ }
+
+ function read($trans_type, $trans_no)
+ {
+ $this->trans_type = $trans_type;
+ $this->trans_no = $trans_no;
+ $this->grn_items = array();
+ $this->gl_codes = array();
+ if ($trans_no) {
+ read_supp_invoice($trans_no, $trans_type, $this);
+ if ($trans_type == ST_SUPPCREDIT)
+ {
+ $this->src_docs = find_src_invoices($trans_no);
+ }
+ read_supplier_details_to_trans($this, $this->supplier_id);
+ }