|
@@ -1526,7 +1526,7 @@ class Whlabel_bh extends Start_Controller {
|
|
}
|
|
}
|
|
$printnum = $this->whlabel_bh_transfer->find_all("number = '".$data['number']."'");
|
|
$printnum = $this->whlabel_bh_transfer->find_all("number = '".$data['number']."'");
|
|
$printnum = array_sum(array_column($printnum,'ts'));
|
|
$printnum = array_sum(array_column($printnum,'ts'));
|
|
- if($data['bhnum']-$printnum-$n < 0)
|
|
|
|
|
|
+ if(($data['bhnum'] + 1)-$printnum-$n < 0)
|
|
{
|
|
{
|
|
echo json_encode(array('msg'=>'打印数量不可超出备货数量!','success'=>false));exit;
|
|
echo json_encode(array('msg'=>'打印数量不可超出备货数量!','success'=>false));exit;
|
|
}
|
|
}
|
|
@@ -1551,7 +1551,7 @@ class Whlabel_bh extends Start_Controller {
|
|
$rows = array();
|
|
$rows = array();
|
|
$label = substr($time,1).rand(10,99);
|
|
$label = substr($time,1).rand(10,99);
|
|
$post['label'] = $label;
|
|
$post['label'] = $label;
|
|
- $rows[] = array('num'=>$post['label'],'title'=>$data['orderinfo'],'jm'=>$data['jm'],'n'=>$n);
|
|
|
|
|
|
+ $rows[] = array('num'=>$post['label'],'title'=>$data['orderinfo'],'jm'=>$data['pm'],'n'=>$n);
|
|
if($this->whlabel_bh_transfer->insert($post))
|
|
if($this->whlabel_bh_transfer->insert($post))
|
|
{
|
|
{
|
|
echo json_encode(array('rows'=>($rows),'id'=>$d,'success'=>true));exit;
|
|
echo json_encode(array('rows'=>($rows),'id'=>$d,'success'=>true));exit;
|