|
|
|
@ -131,13 +131,16 @@ class FeiePrintService implements FeiePrintServiceInterface |
|
|
|
$orderInfo .= $name; |
|
|
|
} |
|
|
|
//商品名长度是否超过一行
|
|
|
|
if($nameLength > ($B+$C+$D)){ |
|
|
|
$goodsTotal = bcmul($goods->number,$goods->price,2); |
|
|
|
$priceLen = mb_strwidth($goods->price); |
|
|
|
$totalLen = mb_strwidth($goodsTotal); |
|
|
|
if($nameLength > ($B+$C+$D-$priceLen-$totalLen)){ |
|
|
|
$orderInfo .= '<BR>'; |
|
|
|
$orderInfo .= str_pad($goods->price,$A+$B+$C,' ',STR_PAD_LEFT); |
|
|
|
}else{ |
|
|
|
$orderInfo .= str_pad($goods->price,$C+$B+$A-$length,' ',STR_PAD_LEFT); |
|
|
|
} |
|
|
|
$orderInfo .= str_pad(bcmul($goods->number,$goods->price,2),$D,' ',STR_PAD_LEFT); |
|
|
|
$orderInfo .= str_pad($goodsTotal,$D,' ',STR_PAD_LEFT); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 订单商品处理结束 |
|
|
|
|