Completed
Branch develop (6a76f5)
by
unknown
22:54
created
htdocs/compta/facture/card.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2638,8 +2638,10 @@
 block discarded – undo
2638 2638
 		$outlangs = $langs;
2639 2639
 		$margin_rate = GETPOSTISSET('marginforalllines') ? GETPOST('marginforalllines', 'int') : '';
2640 2640
 		$mark_rate = GETPOSTISSET('markforalllines') ? GETPOST('markforalllines', 'int') : '';
2641
-		foreach ($object->lines as &$line) if ($line->subprice > 0) {
2641
+		foreach ($object->lines as &$line) {
2642
+			if ($line->subprice > 0) {
2642 2643
 			$subprice_multicurrency = $line->subprice;
2644
+		}
2643 2645
 			if (is_numeric($margin_rate) && $margin_rate > 0) {
2644 2646
 				$line->subprice = floatval(price2num(floatval($line->pa_ht) * (1 + floatval($margin_rate) / 100), 'MU'));
2645 2647
 			} elseif (is_numeric($mark_rate) && $mark_rate > 0) {
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1552,8 +1552,10 @@
 block discarded – undo
1552 1552
 		// Define margin
1553 1553
 		$margin_rate = GETPOSTISSET('marginforalllines') ? GETPOST('marginforalllines', 'int') : '';
1554 1554
 		$mark_rate = GETPOSTISSET('markforalllines') ? GETPOST('markforalllines', 'int') : '';
1555
-		foreach ($object->lines as &$line) if ($line->subprice > 0) {
1555
+		foreach ($object->lines as &$line) {
1556
+			if ($line->subprice > 0) {
1556 1557
 			$subprice_multicurrency = $line->subprice;
1558
+		}
1557 1559
 			if (is_numeric($margin_rate) && $margin_rate > 0) {
1558 1560
 				$line->subprice = floatval(price2num(floatval($line->pa_ht) * (1 + floatval($margin_rate) / 100), 'MU'));
1559 1561
 			} elseif (is_numeric($mark_rate) && $mark_rate > 0) {
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -743,8 +743,10 @@
 block discarded – undo
743 743
 		// Define margin
744 744
 		$margin_rate = GETPOSTISSET('marginforalllines') ? GETPOST('marginforalllines', 'int') : '';
745 745
 		$mark_rate = GETPOSTISSET('markforalllines') ? GETPOST('markforalllines', 'int') : '';
746
-		foreach ($object->lines as &$line) if ($line->subprice > 0) {
746
+		foreach ($object->lines as &$line) {
747
+			if ($line->subprice > 0) {
747 748
 			$subprice_multicurrency = $line->subprice;
749
+		}
748 750
 			if (is_numeric($margin_rate) && $margin_rate > 0) {
749 751
 				$line->subprice = floatval(price2num(floatval($line->pa_ht) * (1 + floatval($margin_rate) / 100), 'MU'));
750 752
 			} elseif (is_numeric($mark_rate) && $mark_rate > 0) {
Please login to merge, or discard this patch.