order item setting
This commit is contained in:
parent
6e7e0c6b9e
commit
8c0fe6eb77
|
|
@ -67,12 +67,13 @@ class OrderItem extends ComponentBase
|
|||
|
||||
|
||||
$stockCalc = $rulonCalc;
|
||||
$calc = (float)($stockCalc - $amountCalc);
|
||||
//dd($stockCalc);
|
||||
if($calc > 0){
|
||||
|
||||
if($stockCalc > 0){
|
||||
|
||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format(($stockCalc - $amountCalc), 2).' artyk</font>';
|
||||
}elseif($stockCalc < 0){
|
||||
$notCompleteCalc = '<font style="color: darkred;">'.number_format(($stockCalc - $amountCalc), 2).' ýetenok</font>';
|
||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format($calc, 2).' artyk</font>';
|
||||
}elseif($calc < 0){
|
||||
$notCompleteCalc = '<font style="color: darkred;">'.number_format($calc, 2).' ýetenok</font>';
|
||||
}
|
||||
|
||||
}else{
|
||||
|
|
@ -106,12 +107,13 @@ class OrderItem extends ComponentBase
|
|||
|
||||
|
||||
$stockCalc = (float)$bagCalc;
|
||||
$calc = (float)($stockCalc - $amountCalc);
|
||||
//dd($stockCalc);
|
||||
if($calc > 0){
|
||||
|
||||
if($stockCalc > 0){
|
||||
|
||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format((float)((float)$stockCalc - (float)$amountCalc), 2).' artyk</font>';
|
||||
}elseif($stockCalc < 0){
|
||||
$notCompleteCalc = '<font style="color: darkred;">'.number_format((float)((float)$stockCalc - (float)$amountCalc), 2).' ýetenok</font>';
|
||||
$notCompleteCalc = '<font style="color: darkgreen;"> +'.number_format($calc, 2).' artyk</font>';
|
||||
}elseif($calc < 0){
|
||||
$notCompleteCalc = '<font style="color: darkred;">'.number_format($calc, 2).' ýetenok</font>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue