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

Description Is Valid
CutSheet 10102 Image
BendSheet 1010202 Image
PressOne 101020202 Image
PressTwo 10102020202 Image
Product 1010202020202 Image
CutSheet 10202 Image
BendSheet 1020202 Image
PressOne 102020202 Image
PressTwo 10202020202 Image
Product 1020202020202 Image
101:1-60

Title : Bill Of Materials

Toolbars

call append()
call Lst_DblClick()
call delete()
call rfq()
call CreateSheet()
call PrintGrid()
call expand()
call cost()
call CreateSheet()
call CloseForm(False)

Buttons

Fields


 (.DESCR)
 (.IS_VALID)
 (.DESCR)
 (.IS_VALID)


AutoScript

lib

proc Lst_DblClick()

     if (mode = "SELONGOOD_MODE") then

        call message("Product BOM has been selected!")

     else

        call OpenFormTop("ptEdit";"AU_BILLOFMATERIALS_E.FM";"WORK.AU_PROD_FORM";1;"?=AU_PROD_FORM")

     endif

end

proc Form_Start()

     call CollapseNavBar()
     call SetCaption("Bill Of Resources")

     mode = __params[4]

end

proc Panels_Start()

     mode = __params[4]

     if (mode = "ALL_MODE") then

        start_sql "DATA" "KOSMOS"
         SELECT * FROM AU_PROD_FORM
        end_sql
        q = QueryByName("DATA")

     endif
     if (mode = "SOFFER_MODE") then

        start_sql "DATA" "KOSMOS"
         SELECT * FROM AU_PROD_FORM
         WHERE (AU_EVENT = :PO)
        end_sql
        q = QueryByName("DATA")
        call TSetParam(q,"PO",__params[5])

     endif
     if (mode = "SELONGOOD_MODE") then

        start_sql "DATA" "KOSMOS"
         SELECT * FROM AU_PROD_FORM
         WHERE (AU_GOOD = :PO)
        end_sql
        q = QueryByName("DATA")
        call TSetParam(q,"PO",__params[5])

     endif

     call TPrepare(q)

end

proc append()

     if (mode = "SOFFER_MODE") then

         call OpenFormTop("ptAppend";"AU_BILLOFMATERIALS_E.FM";"WORK.AU_PROD_FORM";1;"?=AU_PROD_FORM",__params[5])

     elseif (mode = "SELONGOOD_MODE") then

         good_id = __params[5]
         call OpenFormTop("ptAppend";"AU_BILLOFMATERIALS_E.FM";"WORK.AU_PROD_FORM";1;"?=AU_PROD_FORM","SELONGOOD_MODE",good_id)

     else

         call OpenFormTop("ptAppend";"AU_BILLOFMATERIALS_E.FM";"WORK.AU_PROD_FORM";1;"?=AU_PROD_FORM")

     endif

end

proc expand()

     id = TGetFld(q,"AU_PROD_FORM")
     call OpenFormTop("ptBrowse","AU_PROD_FORM_GOOD_B.FM","QRY.DATA","BOM_MODE",id)

end

proc cost()

     id = TGetFld(q,"AU_PROD_FORM")
     call OpenFormTop("ptBrowse";"AU_STANDARDCOST_B.1FM";"QRY.DATA","BOM_MODE",id)

end

{=================================== Request For Quotation ==========================}

proc rfq()

     id = TGetFld(q,"AU_PROD_FORM")
     call OpenFormTop("ptBrowse";"AU_BOM_RFQ.FM";"QRY.DATA","BOM_MODE",id)

end

proc bom()

     id = TGetFld(q,"AU_PROD_FORM")
     call OpenFormTop("ptBrowse";"AU_BOM_B.111FM";"QRY.DATA","PRODFORM_MODE",id)

end