Merged last changes from stable.
[fa-stable.git] / reporting / rep110.php
index bfc1e4e6ccc4850b23b92172c42a62e046a93c2f..f016948f2ce14248f6d244ce68f305a7d7e2aa28 100644 (file)
@@ -109,7 +109,7 @@ function print_deliveries()
                        {
                                if ($myrow2["quantity"] == 0)
                                        continue;
-                                       
+
                                $Net = round2(((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]),
                                   user_price_dec());
                                $SubTotal += $Net;
@@ -126,7 +126,7 @@ function print_deliveries()
                                $newrow = $rep->row;
                                $rep->row = $oldrow;
                                if ($Net != 0.0  || !is_service($myrow2['mb_flag']) || !isset($no_zero_lines_amount) || $no_zero_lines_amount == 0)
-                               {                       
+                               {
                                        $rep->TextCol(2, 3,     $DisplayQty, -2);
                                        $rep->TextCol(3, 4,     $myrow2['units'], -2);
                                        if ($packing_slip == 0)
@@ -135,7 +135,7 @@ function print_deliveries()
                                                $rep->TextCol(5, 6,     $DisplayDiscount, -2);
                                                $rep->TextCol(6, 7,     $DisplayNet, -2);
                                        }
-                               }       
+                               }
                                $rep->row = $newrow;
                                //$rep->NewLine(1);
                                if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
@@ -174,8 +174,8 @@ function print_deliveries()
                                                $tax_type_name = $tax_item['tax_type_name'];
                                        else
                                                $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
-                                       if ($tax_item['included_in_price'])
+
+                                       if ($myrow['tax_included'])
                                {
                                                if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1)
                                        {