on 01-17-2005 2:43 PM
Hi,
I'm creating an invoive with delphi 6.That's my code:
idisp:=vcmp.GetBusinessObject(oInvoices);
idisp.QueryInterface(IID_IDocuments,ido);
odo:=TDocuments.Create(nil);
odo.ConnectTo(ido);
odo.DocType:=dDocument_Items;
odo.CardCode:='bp001';
<b>odo.DocDate:=StrtoDateTime('13.01.05');
odo.DocDueDate:=StrToDateTime('18.01.05'); </b>
odo.Lines.ItemCode:='156';
odo.Lines.Quantity:=20;
odo.Lines.Price:=1.64;
rok:=odo.Add;
Everything is working fine, but my problem is that
docdate and docduedate is always saved with the actual date (in this case 17.01.05). I did the same in Business One and it worked there.
Do anybody know what the problem is?
Hi,
Can you try with
oInvoices.DocDate := IncDay(now, -5);
oInvoices.DocDueDate := IncDay(now, -1);
just to see if is a problem with the date format.
I tried in Delphi 7 and DI 6.5 and worked fine.
Ribeiro Santos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.