Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

Date Event Type Number Invoice Amount Currency Business
15/1/2018 Invoice 1 0 EUR Placerat Velit Quisque LLC
15/3/2018 Invoice 2 0 EUR Dignissim Magna A Associates
23/1/2018 Invoice 3 100 EUR In Lorem Associates
23/1/2018 Invoice 4 0 EUR Ac Mattis LLC
1/9/2019 Payment 111 EUR A Corporation
11/10/2019 Payment 111 EUR A Corporation
6:1-6

Title : Purchase Receives

Toolbars

call paral()
call invoice()
call delete()
call BrowseFilter()
call PrintGrid()
call CreateSheet()

Buttons

Fields


 (.DATE)
 (.DESCR)
 (.NUMBER)
 (.TOTAL_AMOUNT)
 (.CCODE)
 (.TITLE)
 (.DATE)
 (.DESCR)
 (.NUMBER)
 (.TOTAL_AMOUNT)
 (.CCODE)
 (.TITLE)


AutoScript

lib

proc Form_Start()

     call SetCaption("Purchases")

end

proc Panels_Start()

     mode = __params[4]
     pevent = __params[5]
     bus_id = GetActiveEtair("AU_BUSINESS")

     if (mode = "ALL_MODE") then
        start_sql "DATA" "KOSMOS"
         SELECT AU_EVENT.AU_EVENT, AU_EVENT.DATE, AU_EVENT.EVENT_E, AU_CURRENCY.CCODE,
         AU_BUSINESS.TITLE, AU_EVENT.NUMBER, AU_EVENT.TOTAL_AMOUNT, AU_T_EVENT.DESCR,
         AU_EVENT.AU_POSTINGFORM
         FROM ((AU_EVENT LEFT JOIN AU_CURRENCY ON AU_EVENT.AU_CURRENCY = AU_CURRENCY.AU_CURRENCY)
         INNER JOIN AU_T_EVENT ON AU_EVENT.AU_T_EVENT = AU_T_EVENT.AU_T_EVENT)
         INNER JOIN AU_BUSINESS ON AU_EVENT.BUSINESS_FROM = AU_BUSINESS.AU_BUSINESS
         WHERE (AU_T_EVENT.KEVENT1 = 2)
        end_sql
        q = QueryByName("DATA")
        call TSetParam(q,"B",bus_id)
     endif
     if (mode = "SORDER_MODE") then
        start_sql "DATA" "KOSMOS"
         SELECT AU_EVENT.AU_EVENT, AU_EVENT.DATE, AU_EVENT.EVENT_E, AU_CURRENCY.CCODE,
         AU_BUSINESS.TITLE, AU_EVENT.NUMBER, AU_EVENT.TOTAL_AMOUNT, AU_T_EVENT.DESCR,
         AU_EVENT.AU_POSTINGFORM
         FROM ((AU_EVENT RIGHT JOIN AU_CURRENCY ON AU_EVENT.AU_CURRENCY = AU_CURRENCY.AU_CURRENCY)
         INNER JOIN AU_T_EVENT ON AU_EVENT.AU_T_EVENT = AU_T_EVENT.AU_T_EVENT)
         INNER JOIN AU_BUSINESS ON AU_EVENT.BUSINESS_FROM = AU_BUSINESS.AU_BUSINESS
         WHERE (AU_T_EVENT.KEVENT1 = 2) AND (AU_EVENT.BUSINESS_FROM = :B)
         AND (AU_EVENT.EVENT_E = :EV)
        end_sql
        q = QueryByName("DATA")
        call TSetParam(q,"EV",pevent)
        call TSetParam(q,"B",bus_id)
     endif

     call TPrepare(q)

end

proc Lst_DblClick()

     event = TGetFld(q,"AU_EVENT")
     form = TGetFld(q,"AU_POSTINGFORM")
     expr = strcat(event,"=AU_EVENT")
     call OpenForm("ptEdit",form,"WORK.AU_EVENT",1,expr)

end

proc delete()

     event = TGetFld(q,"AU_EVENT")
     form = TGetFld(q,"AU_POSTINGFORM")
     expr = strcat(event,"=AU_EVENT")
     call OpenForm("ptDelete",form,"WORK.AU_EVENT",1,expr)

end

proc paral()

    call OpenForm("ptAppend","AU_EVENT_GOODSIN21_E.FM","WORK.AU_EVENT",1,"?=AU_EVENT")

end

proc invoice()

    call OpenForm("ptAppend","AU_PURCHASE_GOODRECEIPT_E.FM","WORK.AU_EVENT",1,"?=AU_EVENT")

end