Splitting the total amount after import
JBhav
Member Posts: 32
Hello everybody,
I need some ideas. Actually a payment.txt file is being imported through dataport and the records are saved in a temporary table. The payment file contains a grand total for all the transactions done by a particular customer. What i need to do is to split that grand total so that the amount paid for each transaction will be equal to the invoice amount.
How can i split that amount?
Thanks for your help in advance.
Regards,
Bhavna
I need some ideas. Actually a payment.txt file is being imported through dataport and the records are saved in a temporary table. The payment file contains a grand total for all the transactions done by a particular customer. What i need to do is to split that grand total so that the amount paid for each transaction will be equal to the invoice amount.
How can i split that amount?
Thanks for your help in advance.
Regards,
Bhavna
Regards,
Bhavna
Bhavna
0
Comments
-
Can you show the transactions coming in temp table?
what is the invoice amount(amount paid for each transaction will be equal to the invoice amount.)?0 -
Hello,
Please find attatched the extract of the payment table
The grand total is the number in bold.
01PB131050 1480034830012011/07/292011/070000000000150005000000
For Eg:
Customer No Invoice Invoice Amount Amount paid
131050 1 500.00
131050 2 500.05
131050 3 500.00
In the actual table, only after the import of the payment file, the amount paid field will be updated. What is required is that the grand total (150005) has to be split so that the amount paid will be updated for each transactrion made by the customer. I understand that the grand total has to be converted to decimal.
Regards,
BhavnaRegards,
Bhavna
0 -
i am not getting you where you want to split this amount?
you have given 3 trans. for a customer and you don't have seprator for total amount in your text file.
so do you want to total amount in a seperate field or anything else?0 -
vijay_g wrote:i am not getting you where you want to split this amount?
you have given 3 trans. for a customer and you don't have seprator for total amount in your text file.
so do you want to total amount in a seperate field or anything else?
I want to split it in the actual table. In the temporary table the 1st row contains the grand total of the 3 transactions i stated in the example above. I have been able to retrieve the grand total by using this code:
PaymentAmtx := COPYSTR(PaymentFile."Text Line",50,12);
PaymentAmtx := CONVERTSTR(PaymentAmtx,' ','0');
EVALUATE(PaymentAmt,PaymentAmtx);
PaymentAmt := PaymentAmt / 100;
At this moment my actual table is like this:
Customer_No Invoice Invoice_Amount Amount_paid
131050 1 500.00
131050 2 500.05
131050 3 500.00
After importing the payment.txt file in the temporary table, i have used a setfilter on the customer number. Once found, the table should be updated to this so that the amount paid is equal to the invoice amount and the sum of all the amount paid is equal to the grand total:
Customer_No Invoice Invoice_Amount Amount_paid
131050 1 500.00 500.00
131050 2 500.05 500.05
131050 3 500.00 500.00
Regards,
BhavnaRegards,
Bhavna
0 -
Hello everybody,
After all these headaches, finally the problem has been solved.
I was using a wrong loop.Regards,
Bhavna
0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions