You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I'm trying to work out one last bug with my Peachtree export. In order for Peachtree to import a sale and NOT record it as being paid, I need to set the payment LineAmount to zero.
I only need to do this where the customer pays with a Purchase Order (so it's not really paid and will show as accounts receivable). Here's the code I added to my peachtree.php file:
// Set the payment amount to zero if payment method is purchase order
if ($order['paymethod'] = 'purchord') {$order['ordertotal'] = '0';} // End else statement
I tested $order['paymethod'] by printing the output on the end of the line and it does correctly show the payment method used by the customer. However this line is setting the payment LineAmount to zero for ALL orders, regardless of payment method.
I also tried this:
if ($order['paymethod'] = 'purchord') {$order['ordertotal'] = 0;} // End else statement
What am I missing?
Thanks.
Last edited by geraldz (03-14-2013 14:16:57)
Offline
Your IF tests need to use == not a single =
Using a single = is setting a value not testing a value.
if ($order['paymethod'] == 'purchord') { $order['ordertotal'] = 0; } // End else statement
Offline
That worked. A big thank you Dave!
Offline