<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Delivery Notes]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2274&amp;type=atom" />
	<updated>2011-08-11T01:38:54Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2274</id>
		<entry>
			<title type="html"><![CDATA[Re: Delivery Notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9953#p9953" />
			<content type="html"><![CDATA[<p>Here is a poorly written implementation of my suggestion...</p><p>diff -r 6fa1ff512c1b sales/customer_delivery.php<br />--- a/sales/customer_delivery.php&nbsp; &nbsp; Sun Jul 31 00:37:32 2011 +0200<br />+++ b/sales/customer_delivery.php&nbsp; &nbsp; Wed Aug 10 21:37:12 2011 -0400<br />@@ -95,6 +95,14 @@<br /> &nbsp; &nbsp; &nbsp; &nbsp; die (&quot;&lt;br&gt;&lt;b&gt;&quot; . _(&quot;This order has no items. There is nothing to delivery.&quot;) . &quot;&lt;/b&gt;&quot;);<br /> &nbsp; &nbsp; }</p><p>+// Adjust Shipping Charge based upon previous deliveries TAM<br />+&nbsp; &nbsp; $sql = &quot;SELECT sum(ov_freight) as freight FROM &quot;.TB_PREF.&quot;debtor_trans WHERE order_ = &quot; . $_GET[&#039;OrderNumber&#039;] . &quot; AND type = &quot; . ST_CUSTDELIVERY . &quot; AND debtor_no = &quot; . $ord-&gt;customer_id;<br />+&nbsp; &nbsp; $result = db_query($sql, &quot;Can not find delivery notes&quot;);<br />+&nbsp; &nbsp; $row = db_fetch_row($result);<br />+&nbsp; &nbsp; if (!$row[0]) $freight = 0;<br />+&nbsp; &nbsp; else $freight = $row[0];<br />+&nbsp; &nbsp; if ($freight &lt; $ord-&gt;freight_cost) $ord-&gt;freight_cost = $ord-&gt;freight_cost - $freight;<br />+&nbsp; &nbsp; else $ord-&gt;freight_cost = 0;<br /> &nbsp; &nbsp; $_SESSION[&#039;Items&#039;] = $ord;<br /> &nbsp; &nbsp; copy_from_cart();</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2011-08-11T01:38:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9953#p9953</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Delivery Notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=9857#p9857" />
			<content type="html"><![CDATA[<p>When a delivery note is created other deliveries are used to see what has already been delivered.</p><p>But it seems to use the same shipping charge from the original sales order.</p><p>So if you had a SO for $500 of product and $50 of shipping ($550 total) and make 2 deliveries you can end up with $600 of invoices<br />if you are not careful.</p><p>Often I will just apply the shipping to the first delivery and have additional deliveries list $0 shipping.</p><p>Some countries customs agents do not like this.</p><p>Is it possible for the Delivery Note creation form to subtract the shipping from earlier deliveries before it auto fills in the shipping cost?<br />(not negative, of course)</p><p>tom<br />ps. I tried making an example of this in the demo site, but I could not create a SO with a non-zero shipping charge.<br />(well I could create it, but the shipping cost was not saved for some reason)</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2011-07-31T12:15:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=9857#p9857</id>
		</entry>
</feed>
