public function __construct($id = '') { $this->purchase_invoice_id = 'DP' . date('Ymd'); $this->gl_acct_id = $_SESSION['admin_prefs']['def_cash_acct'] ? $_SESSION['admin_prefs']['def_cash_acct'] : AR_SALES_RECEIPTS_ACCOUNT; $this->store_id = isset($_SESSION['admin_prefs']['def_store_id']) ? $_SESSION['admin_prefs']['def_store_id'] : 0; parent::__construct($id); }
function __construct($id = '') { global $db; switch ($this->journal_id) { case 19: $this->gl_acct_id = $_SESSION['admin_prefs']['def_cash_acct'] ? $_SESSION['admin_prefs']['def_cash_acct'] : AR_SALES_RECEIPTS_ACCOUNT; $this->gl_disc_acct_id = AR_DISCOUNT_SALES_ACCOUNT; $this->purchase_invoice_id = 'DP' . date('Ymd'); break; case 21: $this->gl_acct_id = $_SESSION['admin_prefs']['def_cash_acct'] ? $_SESSION['admin_prefs']['def_cash_acct'] : AP_PURCHASE_INVOICE_ACCOUNT; $this->gl_disc_acct_id = AP_DISCOUNT_PURCHASE_ACCOUNT; $result = $db->Execute("select next_check_num from " . TABLE_CURRENT_STATUS); $this->purchase_invoice_id = $result->fields['next_check_num']; break; default: $this->fail_message = 'bad journal ID in phreepos/classes/phreepos.php!'; } $this->bill_primary_name = GEN_PRIMARY_NAME; $this->bill_contact = GEN_CONTACT; $this->bill_address1 = GEN_ADDRESS1; $this->bill_address2 = GEN_ADDRESS2; $this->bill_city_town = GEN_CITY_TOWN; $this->bill_state_province = GEN_STATE_PROVINCE; $this->bill_postal_code = GEN_POSTAL_CODE; $this->bill_country_code = COMPANY_COUNTRY; parent::__construct($id = ''); }
public function __construct($id = '') { global $db; $result = $db->Execute("select next_check_num from " . TABLE_CURRENT_STATUS); $this->purchase_invoice_id = $result->fields['next_check_num']; $this->gl_acct_id = $_SESSION['admin_prefs']['def_cash_acct'] ? $_SESSION['admin_prefs']['def_cash_acct'] : AP_PURCHASE_INVOICE_ACCOUNT; parent::__construct($id); }