Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
leiyong
2020-12-03 16:22:53 +08:00
+2 -2
View File
@@ -24,9 +24,9 @@
<?php if(!empty($products)):?>
<td>
<div class='input-group'>
<?php echo html::select('product', $products, $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required");?>
<?php echo html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required");?>
<?php
if($product->type != 'normal' and isset($branches[$product->branch]))
if(!empty($product) and $product->type != 'normal' and isset($branches[$product->branch]))
{
if($product->branch) $branches = array($product->branch => $branches[$product->branch]);
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branches, $product->branch, "class='form-control chosen'");