debtortrans table: order_ column - Printable Version +- webERP Forum (http://www.weberp.org/forum) +-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1) +--- Forum: How To ? (http://www.weberp.org/forum/forumdisplay.php?fid=6) +--- Thread: debtortrans table: order_ column (/showthread.php?tid=8403) |
debtortrans table: order_ column - HDeriauFF - 06-20-2020 Hi Folks Could you please bring more light to the purpose of the order_ field used by the debtortrans table? I'm currently writing a script that automates the receipt and allocation creation after we upload an authoriznet csv file and need to make sure I fully understand what is passed in the following query from CustomerReceipt.php (around line 445): INSERT INTO debtortrans (transno, type, debtorno, branchcode, order_, trandate, inputdate, prd, reference, tpe, rate, ovamount, ovdiscount, invtext, salesperson) Would it be correct to assume that within a given banktrans identified by transno that contains n debtortrans with this transno, each debtortrans must have a unique order_ ? May I just loop through n transactions by incrementing order_ from 0 to n? Thanks! RE: debtortrans table: order_ column - TimSchofield - 06-20-2020 Hi, order_ is the sales order number that the transaction refers to. It enables you to link back to the salesorders table, so if I understand you correctly it wouldn't do what you are after. The id field is unique in the debtortrans table, would that do? Tim RE: debtortrans table: order_ column - HDeriauFF - 06-20-2020 Thanks Tim, that helps I guess I was a bit confused by looking at the data I currently have in my debtortrans table: for types 12, my order_ is in a range from zero to 54, the most recent often being zero or a single digit, despite my order numbers being over 6000... |