- $pos = get_sales_point($this->pos);
- if (!$pos['cash_sale'] || !$pos['credit_sale'])
- $this->pos = -1; // mark not editable payment type
- if ($this->cash) {
- $this->Location = $pos['pos_location'];
- $this->location_name = $pos['location_name'];
- $this->cash_account = $pos['pos_account'];
- $this->account_name = $pos['bank_account_name'];
+ if ($this->payment_terms['cash_sale']) {
+ $this->Location = $this->pos['pos_location'];
+ $this->location_name = $this->pos['location_name'];
+ $this->cash_account = $this->pos['pos_account'];
+ $this->account_name = $this->pos['bank_account_name'];