Example #1
0
    echo Yii::t('lang', 'sum');
    ?>
</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php 
    $i = 1;
    $countRow = 0;
    $sumTotal = 0;
    ?>
                                        <?php 
    foreach ($lastBillSaleDetails as $lastBillSaleDetail) {
        ?>
                                            <?php 
        $productSerial = ProductSerial::model()->findByAttributes(array('product_code' => $lastBillSaleDetail->bill_sale_detail_barcode));
        $total = $lastBillSaleDetail->bill_sale_detail_price * $lastBillSaleDetail->bill_sale_detail_qty;
        $countRow++;
        $sumTotal += $total;
        ?>
                                            <tr>
                                                <td style="text-align: right"><?php 
        echo $i++;
        ?>
</td>
                                                <td><?php 
        echo $lastBillSaleDetail->bill_sale_detail_barcode;
        ?>
</td>
                                                <td><?php 
        echo @$productSerial->serial_no;
Example #2
0
// $this->renderPartial('//Config/SetLanguage');
?>

<div class="panel">
    <?php 
echo Yii::t('lang', 'repair_information_product_number');
?>
: 
    <?php 
echo $productSerial["serial_no"];
?>

    <div class="panel_body">
        <!-- expire product -->
        <?php 
if (ProductSerial::getExpireStatus($productSerial['product_expire_date'])) {
    ?>
            <div class="alert alert-danger">
                <i class="icon icon-out"></i>
                <strong><?php 
    echo Yii::t('lang', 'this_product_is_out_insurance');
    ?>
</strong>
            </div>
        <?php 
} else {
    ?>
            <div class="alert alert-success">
                <i class="icon icon-ok"></i>
                <strong><?php 
    echo Yii::t('lang', 'insurance_products_are_also_in');
Example #3
0
 public function actionRepair()
 {
     $this->checkLogin();
     $params = @$_POST;
     if (!empty($_POST)) {
         // search
         $search = Util::input($_POST['search_code']);
         if (empty($search)) {
             $search = Util::input($_GET['serial_code']);
         }
         // productSerial
         $productSerial = ProductSerial::model()->findByAttributes(array('serial_no' => $search));
         if (!empty($productSerial)) {
             $product = Product::model()->findByAttributes(array('product_code' => $productSerial->product_code));
             $params['product'] = $product;
             $params['productSerial'] = $productSerial;
         }
         // repair history
         $criteria = new CDbCriteria();
         $criteria->compare('serial_no', Util::input($_POST['search_code']));
         $criteria->order = 'repair_id DESC';
         $repairs = new CActiveDataProvider('Repair');
         $repairs->setCriteria($criteria);
         $params['repairs'] = $repairs;
     }
     $this->render('//Basic/Repair', $params);
 }