Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
debtortrans table: order_ column
06-20-2020, 01:34 AM,
#1
debtortrans table: order_ column
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!
Reply
06-20-2020, 01:50 AM,
#2
RE: debtortrans table: order_ column
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
Reply
06-20-2020, 02:27 AM,
#3
RE: debtortrans table: order_ column
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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)