HEX
Server: Apache
System: Linux server1.royalgt4.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: mostafedeg (1125)
PHP: 5.6.40
Disabled: mail,passthru,parse_ini_file,show_source,eval,assert,pcntl_exec,dl,putenv,proc_open,popen
Upload Files
File: /home/mostafedeg/public_html/erp/models/mysql/ext/SellbilldetailofferMySqlExtDAO.class.php
<?php

/**
 * Class that operate on table 'sellbilldetailoffer'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2020-08-24 15:24
 */
class SellbilldetailofferMySqlExtDAO extends SellbilldetailofferMySqlDAO {

    public function queryWithSellBillId($sellbillid) {
        $sql = 'SELECT sellbilldetail.*, product.productName, store.storeName ,unit.unitName ,productcat.productCatName
                ,size.name as sizeName,color.name as colorName
		 FROM sellbilldetailoffer as sellbilldetail JOIN product
		 ON sellbilldetail.sellbilldetailproductid = product.productId
		 left JOIN productunit
		 ON sellbilldetail.productunitid = productunit.productunitid
		 left JOIN  unit
		 ON unit.unitId = productunit.unitid

		 join productcat

		  on productcat.productCatId=product.productCatId
		  left join store
		  on store.storeid=sellbilldetail.storeid

                left join sizecolor as size on size.id = sellbilldetail.sizeid
                left join sizecolor as color on color.id = sellbilldetail.colorid

		 WHERE sellbilldetail.sellbillid = ' . $sellbillid . '
                 order by sellbilldetail.sellbilldetailid asc';
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

    public function queryWithSellBillIdforpermation($sellbillid) {
        $sql = 'SELECT sellbilldetail.*, product.productName, store.storeName ,unit.unitName ,productcat.productCatName
                ,size.name as sizeName,color.name as colorName
		 FROM sellbilldetailoffer as sellbilldetail JOIN product
		 ON sellbilldetail.sellbilldetailproductid = product.productId JOIN productunit
		 ON sellbilldetail.productunitid = productunit.productunitid JOIN unit
		 ON unit.unitId = productunit.unitid

		 join productcat

		  on productcat.productCatId=product.productCatId
		  left join store
		  on store.storeid=sellbilldetail.storeid

                  left join sizecolor as size on size.id = sellbilldetail.sizeid
                  left join sizecolor as color on color.id = sellbilldetail.colorid

		 WHERE sellbilldetail.sellbillid in( ' . $sellbillid . ' )
                 order by sellbilldetail.sellbilldetailid asc'; //order by storeid  //using in for Bulk print of sell bill
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

}

?>