/** * Insert or update a transactions main record * @param $status * @param $orderid * @return bool|string */ private function insertTransactionRecord($status, $orderid) { if ($orderid == 0) { if ($gid = $this->salesMdl->create($this->ref, json_encode($this->jsonobj), $status, $this->jsonobj->userid, $this->jsonobj->devid, $this->jsonobj->locid, $this->jsonobj->custid, $this->jsonobj->discount, $this->jsonobj->rounding, $this->jsonobj->total, $this->jsonobj->processdt)) { return $gid; } else { return false; } } else { if ($this->salesMdl->edit($orderid, null, json_encode($this->jsonobj), $status, $this->jsonobj->userid, $this->jsonobj->devid, $this->jsonobj->locid, $this->jsonobj->custid, $this->jsonobj->discount, $this->jsonobj->total, $this->jsonobj->processdt) !== false) { return $orderid; } } return false; }