PDC(Postdated checks)

vyanku
Member Posts: 791
If we create new table for PDC contains all the postdated checks information.
Is it possible ?.......
When the due date of the check in PDC is equal to work date then that check is shifted from PDC table to Payment journal automatically for posting purpose.
How can we do this?
Is it possible ?.......
When the due date of the check in PDC is equal to work date then that check is shifted from PDC table to Payment journal automatically for posting purpose.
How can we do this?
0
Answers
-
vyanku wrote:When the due date of the check in PDC is equal to work date then that check is shifted from PDC table to Payment journal automatically for posting purpose.
How can we do this?
Make a report that they can run from the payment journal that fills out the lines. Since they have to check and post the lines anyway there is no need to create some fancy workaround to get it to work automaticly(will only take a couple of seconds to run the report).0 -
Will u please explain ?0
-
Instade of going on GenJnlLine I create another table test.
Now I a trying to insert the Postdated checks from PDC table to test table
For this I write the following code ,
But I will not execute the IF statement.Any body tell me where is the mistake? ](*,) ](*,) How can I solve this mistake? :-kdate := WORKDATE; IF PDC."Check Due Date" = date THEN PDC.INIT; test."posting date" := PDC."Check Due Date"; test.amount := PDC.Amount; test."document no." := PDC."Check No."; IF test."line no." = test."line no." THEN REPEAT test."line no." := test."line no." +1; UNTIL NEXT=0; test.INSERT;
0 -
What are you trying to do. You are writing INIT code of PDC Table and inserting in Test Table. How you think this will work. I have very less exp. of Tech but can see the problem in this code. Further there is no need of using a variable "Date". Setrange the PDC table for workdate and then run the repeat until loop on the PDC table. Also get the last record of test table and assign the new line number value by adding to the last line number.CA Sandeep Singla
http://ssdynamics.co.in0 -
Your code isnt too good, sadly.
A few pointers.
Start by finding the data, then assign, then insert.Setcurrentkey('use the best key'); PDC.setrange('your filter') if PDC.find('-') then // findset if 4.02+ repeat 'assign' // make sure your primary key fields are filled 'insert' until PDC.next = 0;
To keep track of your line no.(to fill out your primary key i suppose) use a variable, NextLineNo
And please do not code this on the form/button etc.0 -
thanks
I learned very much from u.
Thanks Its work now.It is now shifted from PDC to payment journal.
But how to to delete that shifted entry from PDC?0 -
Can do it in two ways.
1. after you run the whole thing use PDC.deleteall // be VERY carefull that you have a filter on, else it will delete all records
2. in the bottom of your repeat-until code just do a pdc.delete // when deleting in a loop it is always a good idea to create a new variable, find the same record, and delete that instead.0 -
It will transfer the line from PDC to payment journal and delete that line from PDC
But I got one more problem.
after shifteing that line it will take the line no randomly likecheckno. date line no.
check no1 date1 1
check no2 date2 3
check no3 dae3 5
My code is below,
Will u tell me where is the peoblem.date := WORKDATE; PDC.SETRANGE(PDC."Check Due Date",WORKDATE); IF PDC.FIND('-') THEN REPEAT IF PDC."Check Due Date" = date THEN REPEAT test.INIT; test."posting date" := PDC."Check Due Date"; test.amount := PDC.Amount; test."document no." := PDC."Check No."; IF test."line no." = test."line no." THEN REPEAT test."line no." := test."line no." +1; UNTIL NEXT=0; test.INSERT; PDC.DELETE; UNTIL PDC.NEXT = 0; UNTIL NEXT=0;
0 -
Could be something like this
variable:PDC2 test.locktable; If test.find('+') then NextLineNo := test."line no." + 10000 else NextLineNo := 10000 //date := // dont use date as variable PDC.SETRANGE("Check Due Date",WORKDATE); IF PDC.FIND('-') THEN REPEAT test.INIT; test."posting date" := PDC."Check Due Date"; test.amount := PDC.Amount; test."document no." := PDC."Check No."; test."line no." := NextLineNo; test.INSERT; NextLineNo += 10000; PDC2 := PDC // just a safe way to not interfere with your loop PDC2.DELETE; UNTIL PDC.NEXT = 0;
It is your responsibility to control what line nos you want to insert, meaning f.ex. to find the last existing line no and insert after that.0 -
Are u defind PDC2 as temp. veriable ???
But what is its purpose? :-k0 -
vyanku wrote:Are u defind PDC2 as temp. veriable ???
No.vyanku wrote:But what is its purpose?
Im just used to using a variable when modifying primary keys/deleting records within loops, because if you are not carefull the loop will terminate. You probably wont need it here though(was just show you what to be aware of).0 -
Ok
Thanks \:D/
I learned very much from u. \:D/
Thanks again. \:D/
:whistle:0 -
Mbad wrote:And please do not code this on the form/button etc.
Can you explain why?0 -
Hii All
I am also trying to do the PDC for vendor and customer.
I am doing this by sorting the vendor ledger entry and customer ledger entry usng a PDC header which i created.
The filters are vendor or customer No and Open Entry in the vendor or customer ledger entry.
Then i push the appropriate fields to a new table. I am doing this so that i can calculate the balance depending up on the check amount i have entered . Then using a boolean Mark posting the Record. I am little doubtful about the table to which i should enter these data so that it can affect the G/L. ](*,)
Currently i am using different form to do the PDC for customer and vendor. Can i do this on one form by giving an option? payable and recevable.
Please Give me All the Information and Ideas :idea: Regarding to this [-o<0 -
hi Prajeesh
i am technical person so i dont know whether i am correct or not but as per my suggession u can do that in one table with filter as payble and receivable.
One thing postdated check are posted when the work date = pdc date.
So u should maintain those checks in pDC table when today = pdc date(any payble/receivable) then that check will automatically or by click on button should be moved in Gen. jnl. or u can do this if the chek under payble then that check will move in bank payment journal and if the check is under receivable then that check will move to bank receipt journal.
Afterposting through these journal the effect will always correct.
best luck.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions