Пример #1
0
                if (data != null) {
                    sale_can_edit_price = data.sale_can_edit_price;
                    sale_can_add_sub_price = data.sale_can_add_sub_price;
                    sale_out_of_stock = data.sale_out_of_stock;

                    if (data.sale_can_edit_price == 'no') {
                        $('.price').attr('readonly', 'readonly');
                    }
                }
            }
        });
    }
</script>

<?php 
$sumTotalPrice = BillSale::sumTotalPrice();
$branchList = Branch::getOptions();
?>

<?php 
if (count($branchList) == 0) {
    ?>
    <script>
        $(function () {
            alert("<?php 
    echo Yii::t('lang', 'sinceyou_have_not_yet_entered_the_field_Please_branches_before');
    ?>
";
                    window.location = 'index.php?r=Config/BranchIndex';
        });
    </script>