[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

How to calculate the total amount of a Sales Order?

GGYY

10/11/2005 8:20:00 AM

I want to get the total amount of a sales order, whenever it has been posted
PackingSlip/Invoice.
That means even though part of sales order is posted packingslip/invoice,
the total amount of this sales order still remains unchanged.

I've read tons of code & tried all menu items under AR, but failed. It seem
that Axapta doesn't provide this function.

By the way, Sales Order->Inquiries->Totals doesn't return the value I want,
it only calculates the remainder amount of sales order if part of sales order
has been posted packingslip/invoice.

Thank you!

b.g.
ggyy
15 Answers

Lennart Conrad

10/12/2005 9:17:00 AM

0

The invoiced amount can be read from CustInvoiceJour
The amount that has been packing slip updated but not invoiced can be found
by initializing salesTotals with the SalesUpdate _specQty parameter =
SalesUpdate::packingslip. You can see this by changing the Update parameter
in the salestotals form to Packing slip.

Note: if you use summary updates you should remeber to take into account
that the invoice journal migth ''belong'' to several sales orders

Regards
Lennart

"GGYY" wrote:

> I want to get the total amount of a sales order, whenever it has been posted
> PackingSlip/Invoice.
> That means even though part of sales order is posted packingslip/invoice,
> the total amount of this sales order still remains unchanged.
>
> I''ve read tons of code & tried all menu items under AR, but failed. It seem
> that Axapta doesn''t provide this function.
>
> By the way, Sales Order->Inquiries->Totals doesn''t return the value I want,
> it only calculates the remainder amount of sales order if part of sales order
> has been posted packingslip/invoice.
>
> Thank you!
>
> b.g.
> ggyy

GGYY

10/13/2005 3:31:00 AM

0

Thank you for your response!
Let''s say it in sample words. I open a new Sales Order, input header & lines
information, now, I want the total amount of this sales order.

after some days, part of this sales order is posted packingslip/invoice,
now, I still want the total amount of this sales order, it would be
(remainder amount + posted amount).

b.r.
ggyy


"Lennart Conrad" wrote:

> The invoiced amount can be read from CustInvoiceJour
> The amount that has been packing slip updated but not invoiced can be found
> by initializing salesTotals with the SalesUpdate _specQty parameter =
> SalesUpdate::packingslip. You can see this by changing the Update parameter
> in the salestotals form to Packing slip.
>
> Note: if you use summary updates you should remeber to take into account
> that the invoice journal migth ''belong'' to several sales orders
>
> Regards
> Lennart
>
> "GGYY" wrote:
>
> > I want to get the total amount of a sales order, whenever it has been posted
> > PackingSlip/Invoice.
> > That means even though part of sales order is posted packingslip/invoice,
> > the total amount of this sales order still remains unchanged.
> >
> > I''ve read tons of code & tried all menu items under AR, but failed. It seem
> > that Axapta doesn''t provide this function.
> >
> > By the way, Sales Order->Inquiries->Totals doesn''t return the value I want,
> > it only calculates the remainder amount of sales order if part of sales order
> > has been posted packingslip/invoice.
> >
> > Thank you!
> >
> > b.g.
> > ggyy

Lennart Conrad

10/13/2005 7:10:00 AM

0

I am not aware of a single form that can display all this information
together. However the Sales Order report, found under
AR/Reports/Transactions/sales Order seems to print the information you
require.
Potentially, you can see which methods from sales table that are used on the
Ordered amount and invoiced amount fields and use them in a customized form.

Regards
Lennart

"GGYY" wrote:

> Thank you for your response!
> Let''s say it in sample words. I open a new Sales Order, input header & lines
> information, now, I want the total amount of this sales order.
>
> after some days, part of this sales order is posted packingslip/invoice,
> now, I still want the total amount of this sales order, it would be
> (remainder amount + posted amount).
>
> b.r.
> ggyy
>
>
> "Lennart Conrad" wrote:
>
> > The invoiced amount can be read from CustInvoiceJour
> > The amount that has been packing slip updated but not invoiced can be found
> > by initializing salesTotals with the SalesUpdate _specQty parameter =
> > SalesUpdate::packingslip. You can see this by changing the Update parameter
> > in the salestotals form to Packing slip.
> >
> > Note: if you use summary updates you should remeber to take into account
> > that the invoice journal migth ''belong'' to several sales orders
> >
> > Regards
> > Lennart
> >
> > "GGYY" wrote:
> >
> > > I want to get the total amount of a sales order, whenever it has been posted
> > > PackingSlip/Invoice.
> > > That means even though part of sales order is posted packingslip/invoice,
> > > the total amount of this sales order still remains unchanged.
> > >
> > > I''ve read tons of code & tried all menu items under AR, but failed. It seem
> > > that Axapta doesn''t provide this function.
> > >
> > > By the way, Sales Order->Inquiries->Totals doesn''t return the value I want,
> > > it only calculates the remainder amount of sales order if part of sales order
> > > has been posted packingslip/invoice.
> > >
> > > Thank you!
> > >
> > > b.g.
> > > ggyy

GGYY

10/13/2005 9:13:00 AM

0

thank you for your help.

b.r.
ggyy

"Lennart Conrad" wrote:

> I am not aware of a single form that can display all this information
> together. However the Sales Order report, found under
> AR/Reports/Transactions/sales Order seems to print the information you
> require.
> Potentially, you can see which methods from sales table that are used on the
> Ordered amount and invoiced amount fields and use them in a customized form.
>
> Regards
> Lennart
>
> "GGYY" wrote:
>
> > Thank you for your response!
> > Let''s say it in sample words. I open a new Sales Order, input header & lines
> > information, now, I want the total amount of this sales order.
> >
> > after some days, part of this sales order is posted packingslip/invoice,
> > now, I still want the total amount of this sales order, it would be
> > (remainder amount + posted amount).
> >
> > b.r.
> > ggyy
> >
> >
> > "Lennart Conrad" wrote:
> >
> > > The invoiced amount can be read from CustInvoiceJour
> > > The amount that has been packing slip updated but not invoiced can be found
> > > by initializing salesTotals with the SalesUpdate _specQty parameter =
> > > SalesUpdate::packingslip. You can see this by changing the Update parameter
> > > in the salestotals form to Packing slip.
> > >
> > > Note: if you use summary updates you should remeber to take into account
> > > that the invoice journal migth ''belong'' to several sales orders
> > >
> > > Regards
> > > Lennart
> > >
> > > "GGYY" wrote:
> > >
> > > > I want to get the total amount of a sales order, whenever it has been posted
> > > > PackingSlip/Invoice.
> > > > That means even though part of sales order is posted packingslip/invoice,
> > > > the total amount of this sales order still remains unchanged.
> > > >
> > > > I''ve read tons of code & tried all menu items under AR, but failed. It seem
> > > > that Axapta doesn''t provide this function.
> > > >
> > > > By the way, Sales Order->Inquiries->Totals doesn''t return the value I want,
> > > > it only calculates the remainder amount of sales order if part of sales order
> > > > has been posted packingslip/invoice.
> > > >
> > > > Thank you!
> > > >
> > > > b.g.
> > > > ggyy

Pegasus \(MVP\)

7/17/2008 9:49:00 AM

0

Let's have a look at your batch file!


"Haoqiang" <Haoqiang@discussions.microsoft.com> wrote in message
news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
> Thanks for your reply!
> I have no "pause" in the command .
> The command shows a description and asks for a press to continue.
>
> "Pegasus (MVP)" wrote:
>
>>
>> "Haoqiang" <Haoqiang@discussions.microsoft.com> wrote in message
>> news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
>> > when I run a BAT command , it paused ,any I need to press a key to
>> > continue.
>> > How can it run automatically because I set this BAT as a scheduled
>> > task.
>> >
>> > Thanks!
>> > Haoqiang
>>
>> Remove the "Pause" command that you have in the batch file.
>>
>>
>>


Al Dunbar

7/17/2008 4:46:00 PM

0

Exactly. Some commands that ask for keyboard input allow for this to be done
by redirection, some have switches you can use on the commandline or
environment variable settings that tell it to go ahead without prompting,
and some, unfortunately, accept that input only in the form of an actual
keystroke.

Once we see the batch file, perhaps someone will know of the workaround.

/Al


"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:%23om$OJ$5IHA.2240@TK2MSFTNGP02.phx.gbl...
> Let's have a look at your batch file!
>
>
> "Haoqiang" <Haoqiang@discussions.microsoft.com> wrote in message
> news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
>> Thanks for your reply!
>> I have no "pause" in the command .
>> The command shows a description and asks for a press to continue.
>>
>> "Pegasus (MVP)" wrote:
>>
>>>
>>> "Haoqiang" <Haoqiang@discussions.microsoft.com> wrote in message
>>> news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
>>> > when I run a BAT command , it paused ,any I need to press a key to
>>> > continue.
>>> > How can it run automatically because I set this BAT as a scheduled
>>> > task.
>>> >
>>> > Thanks!
>>> > Haoqiang
>>>
>>> Remove the "Pause" command that you have in the batch file.
>>>
>>>
>>>
>
>


Pegasus \(MVP\)

7/18/2008 11:54:00 AM

0


"BigDaddyJim" <hungerfordj@gmail.com> wrote in message
news:35dafddb-4f24-4e9d-9fea-29be62d42775@u6g2000prc.googlegroups.com...
On Jul 17, 11:45 am, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> Exactly. Some commands that ask for keyboard input allow for this to be
> done
> by redirection, some have switches you can use on the commandline or
> environment variable settings that tell it to go ahead without prompting,
> and some, unfortunately, accept that input only in the form of an actual
> keystroke.
>
> Once we see the batch file, perhaps someone will know of the workaround.
>
> /Al
>
> "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
>
> news:%23om$OJ$5IHA.2240@TK2MSFTNGP02.phx.gbl...
>
>
>
> > Let's have a look at your batch file!
>
> > "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> >news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
> >> Thanks for your reply!
> >> I have no "pause" in the command .
> >> The command shows a description and asks for a press to continue.
>
> >> "Pegasus (MVP)" wrote:
>
> >>> "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> >>>news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
> >>> > when I run a BAT command , it paused ,any I need to press a key to
> >>> > continue.
> >>> > How can it run automatically because I set this BAT as a scheduled
> >>> > task.
>
> >>> > Thanks!
> >>> > Haoqiang
>
> >>> Remove the "Pause" command that you have in the batch file.- Hide
> >>> quoted text -
>
> - Show quoted text -

Use the WSH SendKeys method...

http://www.devguru.com/Technologies/wsh/quickref/wshshell_Sen...

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad", 9
WScript.Sleep 500 ' Give Notepad some time to load
For i = 1 To 10
WshShell.SendKeys "Hello World!"
WshShell.SendKeys "{ENTER}"
Next

==========

Yes, of course, but unless we can see the OP's batch file we can only
guess how to invoke the SendKeys method while the batch file is
pausing . . .


Haoqiang

7/20/2008 2:43:00 PM

0

Thanks all of you.
Because of the network error ,I haven't respond in time.
It is XXCOPY.
"You have the XXCOPY Freeware version for a stand-alone computer.
If you access the remote disk on a regular basis ,you may consider acquiring
a license for XXCOPY-PRO license.
Press any key to continue..."


"Pegasus (MVP)" wrote:

>
> "BigDaddyJim" <hungerfordj@gmail.com> wrote in message
> news:35dafddb-4f24-4e9d-9fea-29be62d42775@u6g2000prc.googlegroups.com...
> On Jul 17, 11:45 am, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> > Exactly. Some commands that ask for keyboard input allow for this to be
> > done
> > by redirection, some have switches you can use on the commandline or
> > environment variable settings that tell it to go ahead without prompting,
> > and some, unfortunately, accept that input only in the form of an actual
> > keystroke.
> >
> > Once we see the batch file, perhaps someone will know of the workaround.
> >
> > /Al
> >
> > "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
> >
> > news:%23om$OJ$5IHA.2240@TK2MSFTNGP02.phx.gbl...
> >
> >
> >
> > > Let's have a look at your batch file!
> >
> > > "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
> > >> Thanks for your reply!
> > >> I have no "pause" in the command .
> > >> The command shows a description and asks for a press to continue.
> >
> > >> "Pegasus (MVP)" wrote:
> >
> > >>> "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >>>news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
> > >>> > when I run a BAT command , it paused ,any I need to press a key to
> > >>> > continue.
> > >>> > How can it run automatically because I set this BAT as a scheduled
> > >>> > task.
> >
> > >>> > Thanks!
> > >>> > Haoqiang
> >
> > >>> Remove the "Pause" command that you have in the batch file.- Hide
> > >>> quoted text -
> >
> > - Show quoted text -
>
> Use the WSH SendKeys method...
>
> http://www.devguru.com/Technologies/wsh/quickref/wshshell_Sen...
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> WshShell.Run "notepad", 9
> WScript.Sleep 500 ' Give Notepad some time to load
> For i = 1 To 10
> WshShell.SendKeys "Hello World!"
> WshShell.SendKeys "{ENTER}"
> Next
>
> ==========
>
> Yes, of course, but unless we can see the OP's batch file we can only
> guess how to invoke the SendKeys method while the batch file is
> pausing . . .
>
>
>

Haoqiang

7/20/2008 2:43:00 PM

0

Thanks all of you.
Because of the network error ,I haven't respond in time.
It is XXCOPY.
"You have the XXCOPY Freeware version for a stand-alone computer.
If you access the remote disk on a regular basis ,you may consider acquiring
a license for XXCOPY-PRO license.
Press any key to continue..."



"Pegasus (MVP)" wrote:

>
> "BigDaddyJim" <hungerfordj@gmail.com> wrote in message
> news:35dafddb-4f24-4e9d-9fea-29be62d42775@u6g2000prc.googlegroups.com...
> On Jul 17, 11:45 am, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> > Exactly. Some commands that ask for keyboard input allow for this to be
> > done
> > by redirection, some have switches you can use on the commandline or
> > environment variable settings that tell it to go ahead without prompting,
> > and some, unfortunately, accept that input only in the form of an actual
> > keystroke.
> >
> > Once we see the batch file, perhaps someone will know of the workaround.
> >
> > /Al
> >
> > "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
> >
> > news:%23om$OJ$5IHA.2240@TK2MSFTNGP02.phx.gbl...
> >
> >
> >
> > > Let's have a look at your batch file!
> >
> > > "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
> > >> Thanks for your reply!
> > >> I have no "pause" in the command .
> > >> The command shows a description and asks for a press to continue.
> >
> > >> "Pegasus (MVP)" wrote:
> >
> > >>> "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >>>news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
> > >>> > when I run a BAT command , it paused ,any I need to press a key to
> > >>> > continue.
> > >>> > How can it run automatically because I set this BAT as a scheduled
> > >>> > task.
> >
> > >>> > Thanks!
> > >>> > Haoqiang
> >
> > >>> Remove the "Pause" command that you have in the batch file.- Hide
> > >>> quoted text -
> >
> > - Show quoted text -
>
> Use the WSH SendKeys method...
>
> http://www.devguru.com/Technologies/wsh/quickref/wshshell_Sen...
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> WshShell.Run "notepad", 9
> WScript.Sleep 500 ' Give Notepad some time to load
> For i = 1 To 10
> WshShell.SendKeys "Hello World!"
> WshShell.SendKeys "{ENTER}"
> Next
>
> ==========
>
> Yes, of course, but unless we can see the OP's batch file we can only
> guess how to invoke the SendKeys method while the batch file is
> pausing . . .
>
>
>

Haoqiang

7/20/2008 2:44:00 PM

0

Thanks all of you.
Because of the network error ,I haven't respond in time.
It is XXCOPY.
"You have the XXCOPY Freeware version for a stand-alone computer.
If you access the remote disk on a regular basis ,you may consider acquiring
a license for XXCOPY-PRO license.
Press any key to continue..."



"Pegasus (MVP)" wrote:

>
> "BigDaddyJim" <hungerfordj@gmail.com> wrote in message
> news:35dafddb-4f24-4e9d-9fea-29be62d42775@u6g2000prc.googlegroups.com...
> On Jul 17, 11:45 am, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> > Exactly. Some commands that ask for keyboard input allow for this to be
> > done
> > by redirection, some have switches you can use on the commandline or
> > environment variable settings that tell it to go ahead without prompting,
> > and some, unfortunately, accept that input only in the form of an actual
> > keystroke.
> >
> > Once we see the batch file, perhaps someone will know of the workaround.
> >
> > /Al
> >
> > "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
> >
> > news:%23om$OJ$5IHA.2240@TK2MSFTNGP02.phx.gbl...
> >
> >
> >
> > > Let's have a look at your batch file!
> >
> > > "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >news:434BE722-40DB-49E3-A26B-476E0D6D7FC1@microsoft.com...
> > >> Thanks for your reply!
> > >> I have no "pause" in the command .
> > >> The command shows a description and asks for a press to continue.
> >
> > >> "Pegasus (MVP)" wrote:
> >
> > >>> "Haoqiang" <Haoqi...@discussions.microsoft.com> wrote in message
> > >>>news:3D9AA035-EF66-47FA-8B27-CAC4E1F3C746@microsoft.com...
> > >>> > when I run a BAT command , it paused ,any I need to press a key to
> > >>> > continue.
> > >>> > How can it run automatically because I set this BAT as a scheduled
> > >>> > task.
> >
> > >>> > Thanks!
> > >>> > Haoqiang
> >
> > >>> Remove the "Pause" command that you have in the batch file.- Hide
> > >>> quoted text -
> >
> > - Show quoted text -
>
> Use the WSH SendKeys method...
>
> http://www.devguru.com/Technologies/wsh/quickref/wshshell_Sen...
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> WshShell.Run "notepad", 9
> WScript.Sleep 500 ' Give Notepad some time to load
> For i = 1 To 10
> WshShell.SendKeys "Hello World!"
> WshShell.SendKeys "{ENTER}"
> Next
>
> ==========
>
> Yes, of course, but unless we can see the OP's batch file we can only
> guess how to invoke the SendKeys method while the batch file is
> pausing . . .
>
>
>