Schedule of accounts receivable
Df=pd DataFrame (
[[' S01 ', '2020-03-13', 'ks0036', 'zhang', '73 g * 260 cm,' closed ', 'outbound sales', 3600, 35],
[' S02 ', '2020-02-10', 'ks0012', 'Cathy', '83 g * 280 cm,' closed ', 'outbound sales', 6600, 50],
[' S03 ', '2020-04-15', 'ks0025', 'zhao 6', '69 g * 295 cm,' closed ', 'outbound sales', 4500, 30],
[' S04 ', '2020-03-30', 'ks0047', 'cropland 7', '85 g * 270 cm,' closed ', 'outbound sales', 4200, 40],
[' S05 ', '2020-04-30', 'ks0047', 'cropland 7', '80 g * 200 cm,' closed ', 'outbound sales', 3200, 25],
[' F01 ', '2020-05-10', 'ks0047', 'cropland 7', 'None', 'send', 'collection', 6000, None],
[' S06 ', '2020-05-02', 'ks0036', 'zhang', '99 g * 200 cm,' closed ', 'outbound sales', 7500, 30],
[' F02 ', '2020-04-11', 'ks0012', 'Cathy', 'None', 'send', 'collection', 6600, None],
[' S07 ', '2020-05-10', 'ks0049', 'money nine', '88 g * 280 cm,' closed ', 'outbound sales', 3500, 45]],
[' F03 ', '2020-04-30', 'ks0036', 'zhang', 'None', 'send', 'collection', 4200, None],
Columns=[' delivery number ', 'transaction date', 'customer number', 'solicitors',' items, specifications, 'to send and receive direction,' sending and receiving instructions', 'transaction amount', 'payment days'])
Through this table, to achieve the following effects (red part is after add fields) :
1, the table below for the 2020-05-19 statistics date,
2, draining amount column: find df transceiver direction to send the customer number that transaction amount is calculated,
3, the total receivables columns: sales for the current row + customer number for the current row last record of the total receivables
Do you want to be 4, it is concluded that the following visual display,
Number date customer number 'payment days sales transaction amount date date up amount receivable cage 30 days overdue days of total receivables overdue amount will be back the amount overdue 7 heaven
S01 ks0036 zhang SAN 3600 35 2020-03-13 0 0 0 3600 2020-04-18 3600 2020-04-18-600
S02 2020-02-10 ks0012 fifty and 6600 50 2020-04-12 6600 2020-04-12 6600 0 0 0 0
S03 ks0025 zhao six 4500 30 2020-04-15 0 None 4500 4 2020-05-15 4500 4500 4500
S04 ks0047 cropland 7 2020-03-30 4200 40 30 0 0 4200 2020-04-10 4200 2020-04-10-1800
S05 ks0047 cropland 7 2020-04-30 3200 25 2020-05-15 1800 2020-05-15 1400 1400 1400 1400
S06 ks0036 zhang SAN 7500 30 2020-05-02 2020-06-01 600 2020-06-01 5900 5900 0 0 0
S07 ks0049 money nine 3500 45 2020-05-10 2020-06-25
This calculation method is right, consult the great god, help me to look at, how can achieve the above, if you have better ideas, best can write code, for the use of posterity learn, future generations will always remember you!
CodePudding user response:
Advanced database data first, and then get payment days calculation rules, can look for resources for general rule, and then confirm whether to ask our clientsCodePudding user response:
Kingdee erp ~CodePudding user response:
The above are not? Information does not destroy the business documents, accounts receivable documents of accounts receivable at the end of time, ages need to build a configuration table, fully functional during the effective period of a little words to set a configuration with days commonly, be like you this is 30 days overdue 7 days overdue,Through configuration table as well as the existing documents receivable query result row column became a document information, late information... Is ok,