No display of shipping if there are no shipping costs on sales documents or views.
[fa-stable.git] / reporting / rep113.php
index c73388abf565650c4c097d4fa0c84f9bfe0cabda..107b210bef4e1678d7e72f8dda232c0270fb8c76 100644 (file)
@@ -139,7 +139,6 @@ function print_credits()
                        }
 
                        $DisplaySubTot = number_format2($SubTotal,$dec);
-                       $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
 
                $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
                        $doctype = ST_CUSTCREDIT;
@@ -147,9 +146,13 @@ function print_credits()
                        $rep->TextCol(3, 6, _("Sub-total"), -2);
                        $rep->TextCol(6, 7,     $DisplaySubTot, -2);
                        $rep->NewLine();
-                       $rep->TextCol(3, 6, _("Shipping"), -2);
-                       $rep->TextCol(6, 7,     $DisplayFreight, -2);
-                       $rep->NewLine();
+                       if ($myrow['ov_freight'] != 0.0)
+                       {
+                               $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
+                               $rep->TextCol(3, 6, _("Shipping"), -2);
+                               $rep->TextCol(6, 7,     $DisplayFreight, -2);
+                               $rep->NewLine();
+                       }       
                        $tax_items = get_trans_tax_details(ST_CUSTCREDIT, $i);
                        $first = true;
                while ($tax_item = db_fetch($tax_items))