I added Previous Balance (LCY) to Customer table...
demi222
Member Posts: 131
I added a field Previous Balance (LCY) to my Customer Table.
How can I get it to hold the previous balance when I post an invoice.
For example... if Balance (LCY) is 0 for customer demi222.
I make an invoice of a total of 100 euros. I post this invoice.
The Previous Balance (LCY) should be 0.
The Balance (LCY) should be 100.
Next time, if I make an invoice of 100 and post...
the previous balance (LCY) should be 100
and Balance(LCY) should be 200.
can anyone help me on this?
I don't know where it is updating the Customer table.
How can I get it to hold the previous balance when I post an invoice.
For example... if Balance (LCY) is 0 for customer demi222.
I make an invoice of a total of 100 euros. I post this invoice.
The Previous Balance (LCY) should be 0.
The Balance (LCY) should be 100.
Next time, if I make an invoice of 100 and post...
the previous balance (LCY) should be 100
and Balance(LCY) should be 200.
can anyone help me on this?
I don't know where it is updating the Customer table.
0
Comments
-
Oupps..... What a strange need !
To do that, you could probably use the OnInsert trigger of Cust. Ledger Entry Table (Table 21).
Each time an entry is inserted in the table, the system will copy the previous balance of the customer (Table 18) to the "Previous Balance Field". Care, if there are many customer entries each day, it could be really bad for system performance.
If you want the exact code I'm thinking of, ask, at the moment this is just an idea.
Let's try....My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
What I ended up doing is this:
I take the Balance (LCY) and subtract it by the total of the Invoice, and that give me the Previous Balance!
I also made it that if Balance (LCY) = the total of the invoice then the previous balance should be 0.
Works ok!
Thanks for your idea... but it was easier this way
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