object posmodule: Tposmodule
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  OnDestroy = DataModuleDestroy
  Left = 177
  Top = 83
  Height = 656
  Width = 757
  object pos: TDatabase
    DatabaseName = 'pos'
    DriverName = 'INTRBASE'
    LoginPrompt = False
    Params.Strings = (
      'SERVER NAME=POSPREMIER.gdb'
      'USER NAME=dollysoft'
      'PASSWORD=!@#$!$')
    SessionName = 'Default'
    BeforeConnect = posBeforeConnect
    Left = 16
    Top = 16
  end
  object server: TDatabase
    DatabaseName = 'server'
    DriverName = 'INTRBASE'
    LoginPrompt = False
    Params.Strings = (
      'SERVER NAME=d:\orca2012\nminerva.dol'
      'USER NAME=dollysoft'
      'PASSWORD=!@#$!$')
    SessionName = 'Default'
    Left = 64
    Top = 16
  end
  object invoice: TTable
    BeforePost = invoiceBeforePost
    OnNewRecord = invoiceNewRecord
    DatabaseName = 'pos'
    TableName = 'INVOICE'
    Left = 32
    Top = 72
    object invoiceID: TStringField
      FieldName = 'ID'
      Required = True
    end
    object invoiceAUTONO: TIntegerField
      FieldName = 'AUTONO'
    end
    object invoiceREF: TStringField
      FieldName = 'REF'
    end
    object invoiceFDATE: TDateTimeField
      FieldName = 'FDATE'
    end
    object invoiceFIDATE: TDateTimeField
      FieldName = 'FIDATE'
    end
    object invoiceCURRID: TIntegerField
      FieldName = 'CURRID'
    end
    object invoiceCURRVAL: TFloatField
      FieldName = 'CURRVAL'
    end
    object invoiceJOB: TIntegerField
      FieldName = 'JOB'
    end
    object invoiceCONTACT: TIntegerField
      FieldName = 'CONTACT'
    end
    object invoiceSALESMAN: TIntegerField
      FieldName = 'SALESMAN'
    end
    object invoicePRICETYPE: TIntegerField
      FieldName = 'PRICETYPE'
    end
    object invoiceSID: TStringField
      FieldName = 'SID'
    end
    object invoiceSITE: TStringField
      FieldName = 'SITE'
      Size = 3
    end
    object invoiceSSID: TStringField
      FieldName = 'SSID'
    end
    object invoiceVATSID: TStringField
      FieldName = 'VATSID'
    end
    object invoiceINVTYPE: TIntegerField
      FieldName = 'INVTYPE'
    end
    object invoiceNOTE: TStringField
      FieldName = 'NOTE'
      Size = 100
    end
    object invoiceSUBTOTAL: TFloatField
      FieldName = 'SUBTOTAL'
    end
    object invoiceDISCOUNT: TFloatField
      FieldName = 'DISCOUNT'
    end
    object invoiceVAT: TFloatField
      FieldName = 'VAT'
    end
    object invoiceOTHER: TFloatField
      FieldName = 'OTHER'
    end
    object invoiceNET: TFloatField
      FieldName = 'NET'
    end
    object invoiceNETLC: TFloatField
      FieldName = 'NETLC'
    end
    object invoiceORDERNO: TIntegerField
      FieldName = 'ORDERNO'
    end
    object invoiceUSER_: TStringField
      FieldName = 'USER_'
      Size = 30
    end
    object invoiceNAME: TStringField
      FieldName = 'NAME'
      Size = 50
    end
    object invoiceADDRESS: TStringField
      FieldName = 'ADDRESS'
      Size = 50
    end
    object invoiceTEL: TStringField
      FieldName = 'TEL'
    end
    object invoicePAID: TFloatField
      FieldName = 'PAID'
    end
    object invoiceRECEIPTNO: TIntegerField
      FieldName = 'RECEIPTNO'
    end
    object invoiceYESNO: TStringField
      FieldName = 'YESNO'
      Size = 5
    end
    object invoiceFTYPE: TIntegerField
      FieldName = 'FTYPE'
    end
    object invoiceSTOTAL: TFloatField
      FieldName = 'STOTAL'
    end
    object invoiceYESNOVAL: TFloatField
      FieldName = 'YESNOVAL'
    end
    object invoiceTSITE: TStringField
      FieldName = 'TSITE'
      Size = 3
    end
    object invoiceCURRVALLC: TFloatField
      FieldName = 'CURRVALLC'
    end
  end
  object CURRFAC: TTable
    BeforeInsert = CURRFACBeforeInsert
    BeforePost = CURRFACBeforePost
    AfterPost = CURRFACAfterPost
    OnNewRecord = CURRFACNewRecord
    DatabaseName = 'pos'
    IndexName = 'RDB$PRIMARY1'
    TableName = 'CURRFAC'
    Left = 152
    Top = 136
    object CURRFACID: TIntegerField
      FieldName = 'ID'
      Required = True
    end
    object CURRFACAUTONO: TIntegerField
      FieldName = 'AUTONO'
    end
    object CURRFACFNO: TStringField
      FieldName = 'FNO'
    end
    object CURRFACVAT: TFloatField
      FieldName = 'VAT'
      DisplayFormat = '#,0.00;-#,0.00'
    end
    object CURRFACSUBTOTAL: TFloatField
      FieldName = 'SUBTOTAL'
    end
    object CURRFACTOTAL: TFloatField
      FieldName = 'TOTAL'
      DisplayFormat = '#,0.00;-#,0.00'
    end
    object CURRFACCASHIN: TFloatField
      FieldName = 'CASHIN'
    end
    object CURRFACCASHOUT: TFloatField
      FieldName = 'CASHOUT'
    end
    object CURRFACTABLENO: TStringField
      FieldName = 'TABLENO'
    end
    object CURRFACIACTIVE: TStringField
      FieldName = 'IACTIVE'
      Size = 5
    end
    object CURRFACNAME: TStringField
      FieldName = 'NAME'
      Size = 50
    end
    object CURRFACCOVER: TIntegerField
      FieldName = 'COVER'
    end
    object CURRFACISTATE: TIntegerField
      FieldName = 'ISTATE'
    end
    object CURRFACLASTTIME: TDateTimeField
      FieldName = 'LASTTIME'
    end
    object CURRFACCREATETIME: TDateTimeField
      FieldName = 'CREATETIME'
    end
    object CURRFACDISCOUNT: TFloatField
      FieldName = 'DISCOUNT'
    end
    object CURRFACPRN: TStringField
      FieldName = 'PRN'
      Size = 5
    end
    object CURRFACCHEF: TStringField
      FieldName = 'CHEF'
      Size = 30
    end
    object CURRFACSID: TStringField
      FieldName = 'SID'
    end
    object CURRFACCONTACT: TIntegerField
      FieldName = 'CONTACT'
    end
    object CURRFACZALEID: TIntegerField
      FieldName = 'ZALEID'
    end
    object CURRFACSDISC: TFloatField
      FieldName = 'SDISC'
    end
    object CURRFACPAID: TStringField
      FieldName = 'PAID'
      Size = 5
    end
    object CURRFACDOPRN: TStringField
      FieldName = 'DOPRN'
      Size = 5
    end
    object CURRFACUSER_: TStringField
      Alignment = taCenter
      FieldName = 'USER_'
      Size = 30
    end
  end
  object dCURRFAC: TDataSource
    DataSet = CURRFAC
    Left = 160
    Top = 184
  end
  object NEXTC: TTable
    DatabaseName = 'pos'
    TableName = 'NEXTC'
    Left = 320
    Top = 24
    object NEXTCNEXT_: TIntegerField
      FieldName = 'NEXT_'
    end
  end
  object dsitems: TDataSource
    DataSet = items
    Left = 224
    Top = 192
  end
  object dsinvoice: TDataSource
    DataSet = invoice
    Left = 24
    Top = 120
  end
  object CONFIGS: TTable
    CachedUpdates = True
    DatabaseName = 'pos'
    TableName = 'CONFIGS'
    Left = 400
    Top = 120
    object CONFIGSID: TIntegerField
      FieldName = 'ID'
      Required = True
    end
    object CONFIGSCURRVAL: TFloatField
      FieldName = 'CURRVAL'
    end
    object CONFIGSCASHNO: TStringField
      FieldName = 'CASHNO'
    end
    object CONFIGSCURRID: TIntegerField
      FieldName = 'CURRID'
    end
    object CONFIGSSALESNO: TStringField
      FieldName = 'SALESNO'
    end
    object CONFIGSSALESVATNO: TStringField
      FieldName = 'SALESVATNO'
    end
    object CONFIGSVATTYPE: TStringField
      FieldName = 'VATTYPE'
      Size = 5
    end
    object CONFIGSSITE: TStringField
      FieldName = 'SITE'
      Size = 3
    end
    object CONFIGSSN: TStringField
      FieldName = 'SN'
      Size = 3
    end
    object CONFIGSCASHNAME: TStringField
      FieldName = 'CASHNAME'
      Size = 30
    end
    object CONFIGSMIZANENO: TIntegerField
      FieldName = 'MIZANENO'
    end
    object CONFIGSPICTURE: TBlobField
      FieldName = 'PICTURE'
      BlobType = ftBlob
      Size = 1
    end
    object CONFIGSBKCOLOR: TIntegerField
      FieldName = 'BKCOLOR'
    end
    object CONFIGSPOSBAR: TStringField
      FieldName = 'POSBAR'
      Size = 5
    end
    object CONFIGSPOSTOUCH: TStringField
      FieldName = 'POSTOUCH'
      Size = 5
    end
    object CONFIGSJOB: TIntegerField
      FieldName = 'JOB'
    end
    object CONFIGSSALESMAN: TIntegerField
      FieldName = 'SALESMAN'
    end
    object CONFIGSCONTACT: TIntegerField
      FieldName = 'CONTACT'
    end
    object CONFIGSMYMIN: TIntegerField
      FieldName = 'MYMIN'
    end
    object CONFIGSMYCOLOR: TIntegerField
      FieldName = 'MYCOLOR'
    end
    object CONFIGSTRSERVER: TStringField
      FieldName = 'TRSERVER'
      Size = 5
    end
    object CONFIGSCATCOL: TIntegerField
      FieldName = 'CATCOL'
    end
    object CONFIGSPRICE: TIntegerField
      FieldName = 'PRICE'
    end
    object CONFIGSKITCHEN: TStringField
      FieldName = 'KITCHEN'
      Size = 50
    end
    object CONFIGSBAR: TStringField
      FieldName = 'BAR'
      Size = 50
    end
    object CONFIGSCOCKTAIL: TStringField
      FieldName = 'COCKTAIL'
      Size = 50
    end
    object CONFIGSFASTFOOD: TStringField
      FieldName = 'FASTFOOD'
      Size = 50
    end
    object CONFIGSOVEN: TStringField
      FieldName = 'OVEN'
      Size = 50
    end
    object CONFIGSBOUCHERY: TStringField
      FieldName = 'BOUCHERY'
      Size = 50
    end
    object CONFIGSSNACK: TStringField
      FieldName = 'SNACK'
      Size = 50
    end
    object CONFIGSMYDEL: TIntegerField
      FieldName = 'MYDEL'
    end
    object CONFIGSWHEREIS: TIntegerField
      FieldName = 'WHEREIS'
    end
    object CONFIGSPERCE: TIntegerField
      FieldName = 'PERCE'
    end
    object CONFIGSPOSTOUSH: TStringField
      FieldName = 'POSTOUSH'
      Size = 5
    end
    object CONFIGSEXTYESNO: TStringField
      FieldName = 'EXTYESNO'
      Size = 3
    end
    object CONFIGSMIZANEDIGIT: TStringField
      FieldName = 'MIZANEDIGIT'
      Size = 5
    end
    object CONFIGSROUNDING: TIntegerField
      FieldName = 'ROUNDING'
    end
    object CONFIGSMYPRN: TStringField
      FieldName = 'MYPRN'
      Size = 3
    end
    object CONFIGSDISCOUNTTYPE: TIntegerField
      FieldName = 'DISCOUNTTYPE'
    end
    object CONFIGSBYITEM: TStringField
      FieldName = 'BYITEM'
      Size = 5
    end
    object CONFIGSMINUSQTY: TStringField
      FieldName = 'MINUSQTY'
      Size = 5
    end
    object CONFIGSCAFETERIA: TStringField
      FieldName = 'CAFETERIA'
      Size = 50
    end
    object CONFIGSPATESSERIE: TStringField
      FieldName = 'PATESSERIE'
      Size = 50
    end
    object CONFIGSPIZZA: TStringField
      FieldName = 'PIZZA'
      Size = 50
    end
    object CONFIGSSHISHAZ: TStringField
      FieldName = 'SHISHAZ'
      Size = 50
    end
    object CONFIGSFRACTIONPRICE: TStringField
      FieldName = 'FRACTIONPRICE'
      Size = 5
    end
    object CONFIGSMILTIPRICE: TIntegerField
      FieldName = 'MILTIPRICE'
    end
    object CONFIGSTOUCHNOPRN: TStringField
      FieldName = 'TOUCHNOPRN'
      Size = 5
    end
    object CONFIGSMOB: TIntegerField
      FieldName = 'MOB'
    end
    object CONFIGSCHECKQTY: TStringField
      FieldName = 'CHECKQTY'
      Size = 3
    end
    object CONFIGSORDERCHEF: TStringField
      FieldName = 'ORDERCHEF'
      Size = 50
    end
    object CONFIGSATTENTION: TStringField
      FieldName = 'ATTENTION'
    end
    object CONFIGSPINVOICE: TStringField
      FieldName = 'PINVOICE'
      Size = 50
    end
    object CONFIGSCLOSINGREST: TStringField
      FieldName = 'CLOSINGREST'
      Size = 5
    end
    object CONFIGSFALET: TStringField
      FieldName = 'FALET'
      Size = 5
    end
    object CONFIGSMYCOM: TIntegerField
      FieldName = 'MYCOM'
    end
    object CONFIGSPOINTAMOUNT: TFloatField
      FieldName = 'POINTAMOUNT'
    end
    object CONFIGSFTPAUTO: TStringField
      FieldName = 'FTPAUTO'
      Size = 5
    end
  end
  object DataSource1: TDataSource
    Left = 328
    Top = 168
  end
  object stock: TQuery
    OnCalcFields = stockCalcFields
    SQL.Strings = (
      'select * from stock'
      
        'where (item =:myitem) or (barcode1=:myitem) or (barcode2=:myitem' +
        ') or (barcode3=:myitem) or (barcode4=:myitem) '
      ''
      'order by descr1')
    Left = 8
    Top = 208
    ParamData = <
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end>
    object stockITEM: TStringField
      FieldName = 'ITEM'
      Origin = 'SERVER.STOCK.ITEM'
    end
    object stockDESCR1: TStringField
      FieldName = 'DESCR1'
      Origin = 'SERVER.STOCK.DESCR1'
      Size = 50
    end
    object stockDESCR2: TStringField
      FieldName = 'DESCR2'
      Origin = 'SERVER.STOCK.DESCR2'
      Size = 50
    end
    object stockCATEGORY: TStringField
      FieldName = 'CATEGORY'
      Origin = 'SERVER.STOCK.CATEGORY'
      Size = 40
    end
    object stockSUBCAT1: TStringField
      FieldName = 'SUBCAT1'
      Origin = 'SERVER.STOCK.SUBCAT1'
      Size = 40
    end
    object stockSUBCAT2: TStringField
      FieldName = 'SUBCAT2'
      Origin = 'SERVER.STOCK.SUBCAT2'
      Size = 40
    end
    object stockWHEREIS: TStringField
      FieldName = 'WHEREIS'
      Origin = 'SERVER.STOCK.WHEREIS'
      Size = 40
    end
    object stockSUPPLIER: TStringField
      FieldName = 'SUPPLIER'
      Origin = 'SERVER.STOCK.SUPPLIER'
    end
    object stockMASDAR: TStringField
      FieldName = 'MASDAR'
      Origin = 'SERVER.STOCK.MASDAR'
      Size = 30
    end
    object stockPACK: TFloatField
      FieldName = 'PACK'
      Origin = 'SERVER.STOCK.PACK'
    end
    object stockBCOSTUS: TFloatField
      FieldName = 'BCOSTUS'
      Origin = 'SERVER.STOCK.BCOSTUS'
    end
    object stockBCOSTLC: TFloatField
      FieldName = 'BCOSTLC'
      Origin = 'SERVER.STOCK.BCOSTLC'
    end
    object stockPOSPRICE1: TFloatField
      FieldName = 'POSPRICE1'
      Origin = 'SERVER.STOCK.POSPRICE1'
      DisplayFormat = '#,0.00;-#,0.00'
    end
    object stockSALESCURRID: TIntegerField
      FieldName = 'SALESCURRID'
      Origin = 'SERVER.STOCK.SALESCURRID'
    end
    object stockPRICEA: TFloatField
      FieldName = 'PRICEA'
      Origin = 'SERVER.STOCK.PRICEA'
    end
    object stockPRICEB: TFloatField
      FieldName = 'PRICEB'
      Origin = 'SERVER.STOCK.PRICEB'
    end
    object stockPRICEC: TFloatField
      FieldName = 'PRICEC'
      Origin = 'SERVER.STOCK.PRICEC'
    end
    object stockPRICED: TFloatField
      FieldName = 'PRICED'
      Origin = 'SERVER.STOCK.PRICED'
    end
    object stockPRICEE: TFloatField
      FieldName = 'PRICEE'
      Origin = 'SERVER.STOCK.PRICEE'
    end
    object stockPRICEF: TFloatField
      FieldName = 'PRICEF'
      Origin = 'SERVER.STOCK.PRICEF'
    end
    object stockBARCODE1: TStringField
      FieldName = 'BARCODE1'
      Origin = 'SERVER.STOCK.BARCODE1'
    end
    object stockBARCODE2: TStringField
      FieldName = 'BARCODE2'
      Origin = 'SERVER.STOCK.BARCODE2'
    end
    object stockBARCODE3: TStringField
      FieldName = 'BARCODE3'
      Origin = 'SERVER.STOCK.BARCODE3'
    end
    object stockBARCODE4: TStringField
      FieldName = 'BARCODE4'
      Origin = 'SERVER.STOCK.BARCODE4'
    end
    object stockPACK1: TFloatField
      FieldName = 'PACK1'
      Origin = 'SERVER.STOCK.PACK1'
    end
    object stockPACK2: TFloatField
      FieldName = 'PACK2'
      Origin = 'SERVER.STOCK.PACK2'
    end
    object stockPACK3: TFloatField
      FieldName = 'PACK3'
      Origin = 'SERVER.STOCK.PACK3'
    end
    object stockPACK4: TFloatField
      FieldName = 'PACK4'
      Origin = 'SERVER.STOCK.PACK4'
    end
    object stockPRICE1: TFloatField
      FieldName = 'PRICE1'
      Origin = 'SERVER.STOCK.PRICE1'
    end
    object stockPRICE2: TFloatField
      FieldName = 'PRICE2'
      Origin = 'SERVER.STOCK.PRICE2'
    end
    object stockPRICE3: TFloatField
      FieldName = 'PRICE3'
      Origin = 'SERVER.STOCK.PRICE3'
    end
    object stockPRICE4: TFloatField
      FieldName = 'PRICE4'
      Origin = 'SERVER.STOCK.PRICE4'
    end
    object stockMINSTOCK: TFloatField
      FieldName = 'MINSTOCK'
      Origin = 'SERVER.STOCK.MINSTOCK'
    end
    object stockMAXSTOCK: TFloatField
      FieldName = 'MAXSTOCK'
      Origin = 'SERVER.STOCK.MAXSTOCK'
    end
    object stockGWEIGHT: TFloatField
      FieldName = 'GWEIGHT'
      Origin = 'SERVER.STOCK.GWEIGHT'
    end
    object stockNWEIGHT: TFloatField
      FieldName = 'NWEIGHT'
      Origin = 'SERVER.STOCK.NWEIGHT'
    end
    object stockVOLUME: TFloatField
      FieldName = 'VOLUME'
      Origin = 'SERVER.STOCK.VOLUME'
    end
    object stockSALESDISC: TFloatField
      FieldName = 'SALESDISC'
      Origin = 'SERVER.STOCK.SALESDISC'
    end
    object stockPURCHDISC: TFloatField
      FieldName = 'PURCHDISC'
      Origin = 'SERVER.STOCK.PURCHDISC'
    end
    object stockSUNIT: TStringField
      FieldName = 'SUNIT'
      Origin = 'SERVER.STOCK.SUNIT'
      Size = 10
    end
    object stockVAT: TFloatField
      FieldName = 'VAT'
      Origin = 'SERVER.STOCK.VAT'
    end
    object stockBQTY: TFloatField
      FieldName = 'BQTY'
      Origin = 'SERVER.STOCK.BQTY'
    end
    object stockQTY: TFloatField
      FieldName = 'QTY'
      Origin = 'SERVER.STOCK.QTY'
    end
    object stockCDATE: TDateTimeField
      FieldName = 'CDATE'
      Origin = 'SERVER.STOCK.CDATE'
    end
    object stockYESNO: TStringField
      FieldName = 'YESNO'
      Origin = 'SERVER.STOCK.YESNO'
      Size = 5
    end
    object stockCOSTUS: TFloatField
      FieldName = 'COSTUS'
      Origin = 'SERVER.STOCK.COSTUS'
    end
    object stockCOSTLC: TFloatField
      FieldName = 'COSTLC'
      Origin = 'SERVER.STOCK.COSTLC'
    end
    object stockLCOST: TFloatField
      FieldName = 'LCOST'
      Origin = 'SERVER.STOCK.LCOST'
    end
    object stockSTYPE: TIntegerField
      FieldName = 'STYPE'
      Origin = 'SERVER.STOCK.STYPE'
    end
    object stockBUY: TFloatField
      FieldName = 'BUY'
      Origin = 'SERVER.STOCK.BUY'
    end
    object stockPAY: TFloatField
      FieldName = 'PAY'
      Origin = 'SERVER.STOCK.PAY'
    end
    object stockRBUY: TFloatField
      FieldName = 'RBUY'
      Origin = 'SERVER.STOCK.RBUY'
    end
    object stockRPAY: TFloatField
      FieldName = 'RPAY'
      Origin = 'SERVER.STOCK.RPAY'
    end
    object stockADJUSTIN: TFloatField
      FieldName = 'ADJUSTIN'
      Origin = 'SERVER.STOCK.ADJUSTIN'
    end
    object stockADJUSTOUT: TFloatField
      FieldName = 'ADJUSTOUT'
      Origin = 'SERVER.STOCK.ADJUSTOUT'
    end
    object stockPRODIN: TFloatField
      FieldName = 'PRODIN'
      Origin = 'SERVER.STOCK.PRODIN'
    end
    object stockPRODOUT: TFloatField
      FieldName = 'PRODOUT'
      Origin = 'SERVER.STOCK.PRODOUT'
    end
    object stockPROFORMAQTY: TFloatField
      FieldName = 'PROFORMAQTY'
      Origin = 'SERVER.STOCK.PROFORMAQTY'
    end
    object stockORDERQTY: TFloatField
      FieldName = 'ORDERQTY'
      Origin = 'SERVER.STOCK.ORDERQTY'
    end
    object stockOQTY: TFloatField
      FieldName = 'OQTY'
      Origin = 'SERVER.STOCK.OQTY'
    end
    object stockJQTY: TFloatField
      FieldName = 'JQTY'
      Origin = 'SERVER.STOCK.JQTY'
    end
    object stockUSER_: TStringField
      FieldName = 'USER_'
      Origin = 'SERVER.STOCK.USER_'
      Size = 30
    end
    object stockMIZANE: TIntegerField
      FieldName = 'MIZANE'
      Origin = 'SERVER.STOCK.MIZANE'
    end
    object stockMIZANE1: TIntegerField
      FieldName = 'MIZANE1'
      Origin = 'SERVER.STOCK.MIZANE1'
    end
    object stockMIZANE2: TIntegerField
      FieldName = 'MIZANE2'
      Origin = 'SERVER.STOCK.MIZANE2'
    end
    object stockMIZANE3: TIntegerField
      FieldName = 'MIZANE3'
      Origin = 'SERVER.STOCK.MIZANE3'
    end
    object stockMIZANE4: TIntegerField
      FieldName = 'MIZANE4'
      Origin = 'SERVER.STOCK.MIZANE4'
    end
    object stockOFRE: TIntegerField
      FieldName = 'OFRE'
      Origin = 'SERVER.STOCK.OFRE'
    end
    object stockMYPRN: TStringField
      FieldName = 'MYPRN'
      Size = 10
    end
    object stockDISC2: TFloatField
      FieldName = 'DISC2'
    end
    object stockpricedisc: TFloatField
      FieldKind = fkCalculated
      FieldName = 'pricedisc'
      Calculated = True
    end
  end
  object dstock: TDataSource
    DataSet = stock
    Left = 8
    Top = 264
  end
  object GETFNO: TStoredProc
    DatabaseName = 'pos'
    StoredProcName = 'GETFNO'
    Left = 240
    Top = 96
  end
  object GETITEMS: TStoredProc
    DatabaseName = 'pos'
    StoredProcName = 'GETITEMS'
    Left = 160
    Top = 80
    ParamData = <
      item
        DataType = ftInteger
        Name = 'MYJID'
        ParamType = ptOutput
        Value = 2
      end>
  end
  object fromsub: TTable
    DatabaseName = 'server'
    TableName = 'SUB'
    Left = 48
    Top = 208
  end
  object fromstock: TTable
    DatabaseName = 'server'
    Filter = 'yesno<>'#39'NO'#39
    Filtered = True
    TableName = 'STOCK'
    Left = 264
    Top = 240
  end
  object tosub: TTable
    TableName = 'sub.db'
    Left = 48
    Top = 328
  end
  object tostock: TTable
    TableName = 'stock.db'
    Left = 280
    Top = 312
  end
  object fromuser: TTable
    DatabaseName = 'server'
    TableName = 'USER_'
    Left = 320
    Top = 248
  end
  object touser: TTable
    TableName = 'user_.db'
    Left = 328
    Top = 344
  end
  object bmsub: TBatchMove
    Destination = tosub
    Mode = batCopy
    Source = fromsub
    Left = 48
    Top = 264
  end
  object bmstock: TBatchMove
    Destination = tostock
    Mode = batCopy
    Source = fromstock
    Left = 240
    Top = 288
  end
  object bmuser: TBatchMove
    Destination = touser
    Mode = batCopy
    Source = fromuser
    Left = 320
    Top = 296
  end
  object locstock: TTable
    TableName = 'stock.db'
    Left = 424
    Top = 32
    object locstockITEM: TStringField
      FieldName = 'ITEM'
    end
    object locstockDESCR1: TStringField
      FieldName = 'DESCR1'
      Size = 50
    end
    object locstockDESCR2: TStringField
      FieldName = 'DESCR2'
      Size = 50
    end
    object locstockCATEGORY: TStringField
      FieldName = 'CATEGORY'
      Size = 40
    end
    object locstockSUBCAT1: TStringField
      FieldName = 'SUBCAT1'
      Size = 40
    end
    object locstockSUBCAT2: TStringField
      FieldName = 'SUBCAT2'
      Size = 40
    end
    object locstockWHEREIS: TStringField
      FieldName = 'WHEREIS'
      Size = 40
    end
    object locstockSUPPLIER: TStringField
      FieldName = 'SUPPLIER'
    end
    object locstockMASDAR: TStringField
      FieldName = 'MASDAR'
      Size = 30
    end
    object locstockPACK: TFloatField
      FieldName = 'PACK'
    end
    object locstockBCOSTUS: TFloatField
      FieldName = 'BCOSTUS'
    end
    object locstockBCOSTLC: TFloatField
      FieldName = 'BCOSTLC'
    end
    object locstockPOSPRICE1: TFloatField
      FieldName = 'POSPRICE1'
    end
    object locstockSALESCURRID: TIntegerField
      FieldName = 'SALESCURRID'
    end
    object locstockPRICEA: TFloatField
      FieldName = 'PRICEA'
    end
    object locstockPRICEB: TFloatField
      FieldName = 'PRICEB'
    end
    object locstockPRICEC: TFloatField
      FieldName = 'PRICEC'
    end
    object locstockPRICED: TFloatField
      FieldName = 'PRICED'
    end
    object locstockPRICEE: TFloatField
      FieldName = 'PRICEE'
    end
    object locstockPRICEF: TFloatField
      FieldName = 'PRICEF'
    end
    object locstockBARCODE1: TStringField
      FieldName = 'BARCODE1'
    end
    object locstockBARCODE2: TStringField
      FieldName = 'BARCODE2'
    end
    object locstockBARCODE3: TStringField
      FieldName = 'BARCODE3'
    end
    object locstockBARCODE4: TStringField
      FieldName = 'BARCODE4'
    end
    object locstockPACK1: TFloatField
      FieldName = 'PACK1'
    end
    object locstockPACK2: TFloatField
      FieldName = 'PACK2'
    end
    object locstockPACK3: TFloatField
      FieldName = 'PACK3'
    end
    object locstockPACK4: TFloatField
      FieldName = 'PACK4'
    end
    object locstockPRICE1: TFloatField
      FieldName = 'PRICE1'
    end
    object locstockPRICE2: TFloatField
      FieldName = 'PRICE2'
    end
    object locstockPRICE3: TFloatField
      FieldName = 'PRICE3'
    end
    object locstockPRICE4: TFloatField
      FieldName = 'PRICE4'
    end
    object locstockMINSTOCK: TFloatField
      FieldName = 'MINSTOCK'
    end
    object locstockMAXSTOCK: TFloatField
      FieldName = 'MAXSTOCK'
    end
    object locstockGWEIGHT: TFloatField
      FieldName = 'GWEIGHT'
    end
    object locstockNWEIGHT: TFloatField
      FieldName = 'NWEIGHT'
    end
    object locstockVOLUME: TFloatField
      FieldName = 'VOLUME'
    end
    object locstockSALESDISC: TFloatField
      FieldName = 'SALESDISC'
    end
    object locstockPURCHDISC: TFloatField
      FieldName = 'PURCHDISC'
    end
    object locstockSUNIT: TStringField
      FieldName = 'SUNIT'
      Size = 10
    end
    object locstockVAT: TFloatField
      FieldName = 'VAT'
    end
    object locstockBQTY: TFloatField
      FieldName = 'BQTY'
    end
    object locstockQTY: TFloatField
      FieldName = 'QTY'
    end
    object locstockCDATE: TDateTimeField
      FieldName = 'CDATE'
    end
    object locstockYESNO: TStringField
      FieldName = 'YESNO'
      Size = 5
    end
    object locstockCOSTUS: TFloatField
      FieldName = 'COSTUS'
    end
    object locstockCOSTLC: TFloatField
      FieldName = 'COSTLC'
    end
    object locstockLCOST: TFloatField
      FieldName = 'LCOST'
    end
    object locstockSTYPE: TIntegerField
      FieldName = 'STYPE'
    end
    object locstockBUY: TFloatField
      FieldName = 'BUY'
    end
    object locstockPAY: TFloatField
      FieldName = 'PAY'
    end
    object locstockRBUY: TFloatField
      FieldName = 'RBUY'
    end
    object locstockRPAY: TFloatField
      FieldName = 'RPAY'
    end
    object locstockADJUSTIN: TFloatField
      FieldName = 'ADJUSTIN'
    end
    object locstockADJUSTOUT: TFloatField
      FieldName = 'ADJUSTOUT'
    end
    object locstockPRODIN: TFloatField
      FieldName = 'PRODIN'
    end
    object locstockPRODOUT: TFloatField
      FieldName = 'PRODOUT'
    end
    object locstockPROFORMAQTY: TFloatField
      FieldName = 'PROFORMAQTY'
    end
    object locstockORDERQTY: TFloatField
      FieldName = 'ORDERQTY'
    end
    object locstockOQTY: TFloatField
      FieldName = 'OQTY'
    end
    object locstockJQTY: TFloatField
      FieldName = 'JQTY'
    end
    object locstockUSER_: TStringField
      FieldName = 'USER_'
      Size = 30
    end
    object locstockMIZANE: TIntegerField
      FieldName = 'MIZANE'
    end
    object locstockMIZANE1: TIntegerField
      FieldName = 'MIZANE1'
    end
    object locstockMIZANE2: TIntegerField
      FieldName = 'MIZANE2'
    end
    object locstockMIZANE3: TIntegerField
      FieldName = 'MIZANE3'
    end
    object locstockMIZANE4: TIntegerField
      FieldName = 'MIZANE4'
    end
    object locstockOFRE: TIntegerField
      FieldName = 'OFRE'
    end
    object locstockCARTOON: TFloatField
      FieldName = 'CARTOON'
    end
  end
  object fromcurr: TTable
    DatabaseName = 'server'
    TableName = 'CURR'
    Left = 384
    Top = 256
  end
  object bmcurr: TBatchMove
    Destination = tocurr
    Mode = batCopy
    Source = fromcurr
    Left = 384
    Top = 296
  end
  object tocurr: TTable
    TableName = 'curr.db'
    Left = 376
    Top = 344
  end
  object passdlg: TsuiInputDialog
    Position = poScreenCenter
    Caption = 'Password Dialog'
    UIStyle = FromThemeFile
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlack
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    CaptionFont.Charset = DEFAULT_CHARSET
    CaptionFont.Color = clWhite
    CaptionFont.Height = -11
    CaptionFont.Name = 'Tahoma'
    CaptionFont.Style = [fsBold]
    PasswordChar = '*'
    PromptText = 'Password:'
    ButtonOKCaption = 'OK'
    ButtonCancelCaption = 'Cancel'
    ButtonCursor = crHandPoint
    Left = 408
    Top = 180
  end
  object dlocstock: TDataSource
    DataSet = locstock
    Left = 424
    Top = 80
  end
  object dconfigs: TDataSource
    DataSet = CONFIGS
    Left = 440
    Top = 128
  end
  object dtosub: TDataSource
    DataSet = tosub
    Left = 8
    Top = 328
  end
  object dtouser: TDataSource
    DataSet = touser
    Left = 296
    Top = 360
  end
  object dtocurr: TDataSource
    DataSet = tocurr
    Left = 352
    Top = 392
  end
  object DOEMPTY: TStoredProc
    DatabaseName = 'pos'
    StoredProcName = 'DOEMPTY'
    Left = 88
    Top = 64
  end
  object frxcurrfac: TfrxDBDataset
    UserName = 'frxcurrfac'
    CloseDataSource = False
    DataSource = dCURRFAC
    BCDToCurrency = False
    Left = 112
    Top = 168
  end
  object frxitems: TfrxDBDataset
    UserName = 'frxitems'
    CloseDataSource = False
    FieldAliases.Strings = (
      'ID=ID'
      'MID=MID'
      'SITE=SITE'
      'STTYPE=STTYPE'
      'QTY=QTY'
      'FRAC=FRAC'
      'PACK=PACK'
      'PRICE=PRICE'
      'DISCOUNT=DISCOUNT'
      'VAT=VAT'
      'COSTUS=COSTUS'
      'COSTLC=COSTLC'
      'CATREGORYID=CATREGORYID'
      'VATAMOUNT=VATAMOUNT'
      'DEBITUS=DEBITUS'
      'CREDITUS=CREDITUS'
      'BARCODE=BARCODE'
      'BONENO=BONENO'
      'DEBITQTY=DEBITQTY'
      'CREDITQTY=CREDITQTY'
      'YESNO=YESNO'
      'TOTAL=TOTAL'
      'FDATE=FDATE'
      'ALLQTY=ALLQTY'
      'JOB=JOB'
      'SID=SID'
      'SALESMAN=SALESMAN'
      'CONTACT=CONTACT'
      'TSITE=TSITE'
      'DEBITLC=DEBITLC'
      'CLC=CLC'
      'CREDITLC=CREDITLC'
      'STQTY=STQTY'
      'CURRFAC=CURRFAC'
      'AUTOCURRFAC=AUTOCURRFAC'
      'PRN=PRN'
      'DESCR=DESCR'
      'MYPRN=MYPRN'
      'EXTYESNO=EXTYESNO'
      'FIDATE=FIDATE'
      'ITEM=ITEM')
    DataSource = dsitems
    BCDToCurrency = False
    Left = 208
    Top = 80
  end
  object frxinv: TfrxDBDataset
    UserName = 'frxinv'
    CloseDataSource = False
    DataSource = dsinvoice
    BCDToCurrency = False
    Left = 88
    Top = 120
  end
  object frxuser_: TfrxDBDataset
    UserName = 'frxuser_'
    CloseDataSource = False
    OpenDataSource = False
    DataSource = dtouser
    BCDToCurrency = False
    Left = 416
    Top = 392
  end
  object fromdescr: TTable
    DatabaseName = 'server'
    TableName = 'DETDESCR'
    Left = 96
    Top = 240
  end
  object bmdescr: TBatchMove
    Destination = todescr
    Mode = batCopy
    Source = fromdescr
    Left = 96
    Top = 288
  end
  object todescr: TTable
    TableName = 'detdescr.db'
    Left = 88
    Top = 336
  end
  object AHMHotKeyHolder1: TAHMHotKeyHolder
    GlobalKeys = <
      item
        GlobalKey = 49220
        OnKeyDown = AHMHotKeyHolder1GlobalKeys0KeyDown
      end
      item
        GlobalKey = 32883
        OnKeyDown = AHMHotKeyHolder1GlobalKeys1KeyDown
      end
      item
        GlobalKey = 49198
        OnKeyDown = AHMHotKeyHolder1GlobalKeys2KeyDown
      end
      item
        GlobalKey = 16459
        OnKeyDown = AHMHotKeyHolder1GlobalKeys3KeyDown
      end
      item
        GlobalKey = 123
      end>
    Left = 296
    Top = 72
  end
  object itemsinfo: TTable
    CachedUpdates = True
    OnNewRecord = itemsinfoNewRecord
    DatabaseName = 'pos'
    IndexFieldNames = 'ID'
    MasterFields = 'ID'
    MasterSource = dsitems
    TableName = 'ITEMSINFO'
    Left = 256
    Top = 152
    object itemsinfoID: TIntegerField
      FieldName = 'ID'
      Required = True
    end
    object itemsinfoDESCR: TStringField
      FieldName = 'DESCR'
      Size = 200
    end
  end
  object ditemsinfo: TDataSource
    DataSet = itemsinfo
    Left = 280
    Top = 200
  end
  object fromcontact: TTable
    DatabaseName = 'server'
    TableName = 'CONTACTLIST'
    Left = 200
    Top = 248
  end
  object bmcontact: TBatchMove
    Destination = tocontact
    Mode = batCopy
    Source = fromcontact
    Left = 192
    Top = 288
  end
  object tocontact: TTable
    TableName = 'CONTACTLIST.db'
    Left = 192
    Top = 344
  end
  object dtocontact: TDataSource
    DataSet = tocontact
    Left = 248
    Top = 344
  end
  object fromcomp: TTable
    DatabaseName = 'server'
    TableName = 'COMPANY'
    Left = 440
    Top = 256
  end
  object bmcomp: TBatchMove
    Destination = tocomp
    Mode = batCopy
    Source = fromcomp
    Left = 440
    Top = 296
  end
  object tocomp: TTable
    TableName = 'COMPANY.db'
    Left = 440
    Top = 344
  end
  object dtocomp: TDataSource
    DataSet = tocomp
    Left = 456
    Top = 392
  end
  object ZALE: TTable
    CachedUpdates = True
    AfterScroll = ZALEAfterScroll
    DatabaseName = 'pos'
    IndexFieldNames = 'ID'
    TableName = 'MYZALE'
    Left = 240
    Top = 16
    object ZALEID: TIntegerField
      FieldName = 'ID'
      Required = True
    end
    object ZALENAME: TStringField
      FieldName = 'NAME'
      Size = 30
    end
  end
  object DZALE: TDataSource
    DataSet = ZALE
    Left = 272
    Top = 16
  end
  object kkk: TabcLauncher
    Date.Day = 17
    Date.Month = 10
    Date.Year = 2009
    Enabled = False
    Time.Hour = 14
    Time.Min = 25
    Time.Sec = 51
    Time.MSec = 437
    TimeLapse.Hour = 0
    TimeLapse.Min = 0
    TimeLapse.Sec = 0
    TimeLapse.MSec = 0
    Wait = False
    WeekDay = ldSunday
    LaunchType = altShellExecFile
    ShellParams.FileName = 'osk.exe'
    Left = 168
    Top = 16
  end
  object ImageList1: TImageList
    Left = 376
    Top = 24
    Bitmap = {
      [encoded data, 8768 characters]
      000000000000}
  end
  object EXTCOMP: TTable
    CachedUpdates = True
    DatabaseName = 'pos'
    TableName = 'EXTCOMP'
    Left = 480
    Top = 200
    object EXTCOMPCODE: TStringField
      FieldName = 'CODE'
      Required = True
    end
    object EXTCOMPMYTYPE: TStringField
      FieldName = 'MYTYPE'
      Size = 10
    end
    object EXTCOMPCOMPANY: TStringField
      FieldName = 'COMPANY'
      Size = 50
    end
  end
  object dEXTCOMP: TDataSource
    DataSet = EXTCOMP
    Left = 496
    Top = 240
  end
  object qextcomp: TQuery
    DatabaseName = 'pos'
    SQL.Strings = (
      'select * from extcomp'
      'where code=:mycode')
    Left = 496
    Top = 104
    ParamData = <
      item
        DataType = ftString
        Name = 'mycode'
        ParamType = ptUnknown
      end>
    object qextcompCODE: TStringField
      FieldName = 'CODE'
      Origin = 'POS.EXTCOMP.CODE'
    end
    object qextcompMYTYPE: TStringField
      FieldName = 'MYTYPE'
      Origin = 'POS.EXTCOMP.MYTYPE'
      Size = 10
    end
    object qextcompCOMPANY: TStringField
      FieldName = 'COMPANY'
      Origin = 'POS.EXTCOMP.COMPANY'
      Size = 50
    end
  end
  object frxDBDataset1: TfrxDBDataset
    UserName = 'frxconfigs'
    CloseDataSource = False
    DataSource = dconfigs
    BCDToCurrency = False
    Left = 344
    Top = 120
  end
  object frombar: TTable
    DatabaseName = 'server'
    TableName = 'BARCODES'
    Left = 136
    Top = 240
  end
  object bmbar: TBatchMove
    Destination = tobar
    Mode = batCopy
    Source = frombar
    Left = 136
    Top = 296
  end
  object tobar: TTable
    TableName = 'barcodes.db'
    TableType = ttParadox
    Left = 120
    Top = 336
  end
  object barcodes: TQuery
    SQL.Strings = (
      'select * from barcodes.db'
      'where (barcode =:myitem) ')
    UniDirectional = True
    Left = 64
    Top = 160
    ParamData = <
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end>
  end
  object updoempty: TQuery
    DatabaseName = 'pos'
    SQL.Strings = (
      
        'CREATE PROCEDURE DOEMPTY   AS                                   ' +
        '      '
      'declare variable myvat VARCHAR(5);'
      'declare variable myext VARCHAR(5);'
      'declare variable mycount integer;'
      'BEGIN'
      'select extyesno,vattype from configs into ::myext,::myvat;'
      ''
      ''
      
        'update items set mid=(select max(id) from invoice),fdate=(select' +
        ' max(fdate) from invoice) ;'
      ''
      
        'INSERT INTO CURRFAC(id,fno,sid,total,iactive,contact) select cur' +
        'rfac,max(mid),max(sid),sum(total),'#39'False'#39',0 from items where cur' +
        'rfac not in (select id from currfac) group by currfac;'
      'update currfac set fno=(select max(id) from invoice) ;'
      
        'update currfac set  iactive='#39'False'#39' where  iactive<>'#39'True'#39' or ia' +
        'ctive is null;'
      
        'update currfac set SID=(select max(Sid) from invoice) WHERE SID ' +
        'IS NULL ;'
      'update currfac set SID='#39'5301001'#39' WHERE SID IS NULL ;'
      'update currfac set CONTACT=0 WHERE CONTACT IS NULL ;'
      
        'update items set sid=(select max(sid) from currfac where currfac' +
        '.id=items.currfac) ;'
      
        'update items set sid=(select max(sid) from currfac) where sid is' +
        ' null ;'
      
        'update items set contact=(select max(contact) from currfac where' +
        ' currfac.id=items.currfac) ;'
      
        'insert into items3(id,mid,site,item,sttype,qty,frac,pack,price,d' +
        'iscount,vat,'
      'vatamount,debitus,creditus,barcode,yesno,total,fdate,'
      
        'allqty,job,sid,salesman,contact,clc,currfac,autocurrfac,descr,ex' +
        'tyesno,fidate)'
      
        ' select id,mid,site,item,sttype,qty,frac,pack,price,discount,vat' +
        ','
      'vatamount,debitus,creditus,barcode,yesno,total,fdate,'
      
        'allqty,job,sid,salesman,contact,clc,currfac,autocurrfac,descr,ex' +
        'tyesno,fidate from  items where currfac in (select id from currf' +
        'ac where iactive='#39'False'#39');'
      ''
      'DELETE FROM ITEMS WHERE EXTYESNO=1;'
      'if (myvat='#39'TTC'#39') then'
      'begin'
      
        'UPDATE CURRFAC SET TOTAL=(SELECT SUM(TOTAL) FROM ITEMS WHERE CUR' +
        'RFAC=CURRFAC.ID)-discount;'
      
        'UPDATE CURRFAC SET VAT=(SELECT SUM(vatamount) FROM ITEMS WHERE C' +
        'URRFAC=CURRFAC.ID);'
      'UPDATE CURRFAC SET SUBTOTAL=TOTAL-VAT+discount;'
      'end'
      'else'
      'begin'
      
        'UPDATE CURRFAC SET TOTAL=(SELECT SUM(TOTAL+vatamount) FROM ITEMS' +
        ' WHERE CURRFAC=CURRFAC.ID)-discount;'
      
        'UPDATE CURRFAC SET VAT=(SELECT SUM(vatamount) FROM ITEMS WHERE C' +
        'URRFAC=CURRFAC.ID);'
      'UPDATE CURRFAC SET SUBTOTAL=TOTAL-VAT+discount;'
      'end'
      ''
      ''
      ''
      
        'insert into invoice2(fno,id,fdate,fidate,currid,currval,job,cont' +
        'act,salesman,sid,site,ssid,vatsid,'
      
        'subtotal,discount,vat,net,netlc,user_,yesno,ftype,currvallc) sel' +
        'ect max(invoice.id),max(invoice.id)||max(currfac.id),max(invoice' +
        '.fdate),max(invoice.fidate),1,1,max(invoice.job),'
      
        'max(currfac.contact),max(invoice.salesman),currfac.sid,max(invoi' +
        'ce.site),max(invoice.ssid),max(invoice.vatsid),'
      
        'sum(currfac.subtotal),sum(currfac.discount),sum(currfac.vat),sum' +
        '(currfac.total),sum(currfac.total),max(invoice.user_),max(invoic' +
        'e.yesno),1,'
      
        'max(invoice.currvallc) from invoice,currfac where currfac.iactiv' +
        'e='#39'False'#39'   group by currfac.sid ;'
      ''
      
        'update items set mid=(select id from invoice2 where invoice2.fno' +
        '=items.mid and invoice2.sid=items.sid ) where currfac in (select' +
        ' id from currfac where currfac.iactive='#39'False'#39');'
      
        'update items set mid=(select max(id) from invoice2 ) where mid i' +
        's null ;'
      
        'insert into items2(id,mid,site,item,sttype,qty,frac,pack,price,d' +
        'iscount,vat,vatamount,debitus,creditus,barcode,yesno,total,fdate' +
        ','
      
        'allqty,job,sid,salesman,contact,clc,currfac,autocurrfac,descr,ex' +
        'tyesno,fidate)'
      
        ' select id,mid,site,item,sttype,qty,frac,pack,price,discount,vat' +
        ','
      'vatamount,debitus,creditus,barcode,yesno,total,fdate,'
      
        'allqty,job,sid,salesman,contact,clc,currfac,autocurrfac,descr,ex' +
        'tyesno,fidate from  items where currfac in (select id from currf' +
        'ac where iactive='#39'False'#39');'
      ''
      
        'update items2 set mid=(select max(id) from invoice2 where fdate=' +
        #39'today'#39' and sid not like '#39'4%'#39' ) where mid is null ;'
      ''
      'select count(*) from invoice2 into ::mycount;'
      'if (mycount is null) then mycount=0;'
      'if (mycount=0) then'
      'begin'
      
        'insert into invoice2(id,fdate,fidate,currid,currval,job,contact,' +
        'salesman,sid,site,ssid,vatsid,'
      'subtotal,discount,vat,net,netlc,user_,yesno,ftype,currvallc)'
      
        'select id,'#39'today'#39',fidate,currid,currval,job,contact,salesman,sid' +
        ',site,ssid,vatsid,'
      
        'subtotal,discount,vat,net,netlc,user_,yesno,ftype,currvallc from' +
        ' invoice;'
      ''
      
        'update items2 set mid=(select max(id) from invoice2 where  fdate' +
        '='#39'today'#39' and  sid not like '#39'4%'#39' ) ;'
      ''
      'end'
      ''
      'delete from invoice;'
      
        'delete from items  where currfac in (select id from currfac wher' +
        'e iactive='#39'False'#39');'
      'delete from currfac where iactive='#39'False'#39' ;'
      ''
      ''
      ''
      ''
      'END')
    Left = 456
    Top = 8
  end
  object itinfo: TTable
    DatabaseName = 'server'
    TableName = 'ITEMINFO'
    Left = 32
    Top = 400
  end
  object bminfo: TBatchMove
    Destination = toinfo
    Mode = batCopy
    Source = itinfo
    Left = 72
    Top = 400
  end
  object toinfo: TTable
    TableName = 'itinfo.db'
    TableType = ttParadox
    Left = 120
    Top = 400
  end
  object qitinfo: TQuery
    BeforeOpen = qitinfoBeforeOpen
    SQL.Strings = (
      'select * from itinfo'
      'where sid=:myitem')
    Left = 192
    Top = 416
    ParamData = <
      item
        DataType = ftString
        Name = 'myitem'
        ParamType = ptUnknown
      end>
  end
  object dqitinfo: TDataSource
    DataSet = qitinfo
    Left = 248
    Top = 440
  end
  object items: TTable
    BeforeClose = itemsBeforeClose
    BeforePost = itemsBeforePost
    AfterPost = itemsAfterPost
    OnNewRecord = itemsNewRecord
    DatabaseName = 'pos'
    IndexFieldNames = 'CURRFAC;id'
    MasterFields = 'ID'
    MasterSource = dCURRFAC
    TableName = 'ITEMS'
    Left = 208
    Top = 152
    object itemsID: TIntegerField
      FieldName = 'ID'
      Required = True
    end
    object itemsMID: TStringField
      FieldName = 'MID'
    end
    object itemsITEM: TStringField
      FieldName = 'ITEM'
    end
    object itemsSITE: TStringField
      FieldName = 'SITE'
      Size = 3
    end
    object itemsSTTYPE: TStringField
      FieldName = 'STTYPE'
    end
    object itemsQTY: TFloatField
      FieldName = 'QTY'
      OnChange = itemsQTYChange
    end
    object itemsFRAC: TFloatField
      FieldName = 'FRAC'
      OnChange = itemsQTYChange
    end
    object itemsPACK: TFloatField
      FieldName = 'PACK'
      OnChange = itemsQTYChange
    end
    object itemsPRICE: TFloatField
      FieldName = 'PRICE'
      OnChange = itemsPRICEChange
    end
    object itemsDISCOUNT: TFloatField
      FieldName = 'DISCOUNT'
      OnChange = itemsQTYChange
    end
    object itemsVAT: TFloatField
      FieldName = 'VAT'
      OnChange = itemsQTYChange
    end
    object itemsCOSTUS: TFloatField
      FieldName = 'COSTUS'
    end
    object itemsCOSTLC: TFloatField
      FieldName = 'COSTLC'
    end
    object itemsCATREGORYID: TIntegerField
      FieldName = 'CATREGORYID'
    end
    object itemsVATAMOUNT: TFloatField
      FieldName = 'VATAMOUNT'
    end
    object itemsDEBITUS: TFloatField
      FieldName = 'DEBITUS'
    end
    object itemsCREDITUS: TFloatField
      FieldName = 'CREDITUS'
    end
    object itemsBARCODE: TStringField
      FieldName = 'BARCODE'
    end
    object itemsBONENO: TStringField
      FieldName = 'BONENO'
      Size = 10
    end
    object itemsDEBITQTY: TFloatField
      FieldName = 'DEBITQTY'
    end
    object itemsCREDITQTY: TFloatField
      FieldName = 'CREDITQTY'
    end
    object itemsYESNO: TStringField
      FieldName = 'YESNO'
      Size = 5
    end
    object itemsTOTAL: TFloatField
      FieldName = 'TOTAL'
    end
    object itemsFDATE: TDateTimeField
      FieldName = 'FDATE'
    end
    object itemsALLQTY: TFloatField
      FieldName = 'ALLQTY'
    end
    object itemsJOB: TIntegerField
      FieldName = 'JOB'
    end
    object itemsSID: TStringField
      FieldName = 'SID'
    end
    object itemsSALESMAN: TIntegerField
      FieldName = 'SALESMAN'
    end
    object itemsCONTACT: TIntegerField
      FieldName = 'CONTACT'
    end
    object itemsTSITE: TStringField
      FieldName = 'TSITE'
      Size = 3
    end
    object itemsDEBITLC: TFloatField
      FieldName = 'DEBITLC'
    end
    object itemsCLC: TFloatField
      FieldName = 'CLC'
    end
    object itemsCREDITLC: TFloatField
      FieldName = 'CREDITLC'
    end
    object itemsSTQTY: TFloatField
      FieldName = 'STQTY'
    end
    object itemsCURRFAC: TIntegerField
      FieldName = 'CURRFAC'
    end
    object itemsAUTOCURRFAC: TIntegerField
      FieldName = 'AUTOCURRFAC'
    end
    object itemsPRN: TStringField
      FieldName = 'PRN'
      Size = 5
    end
    object itemsDESCR: TStringField
      FieldName = 'DESCR'
      Size = 50
    end
    object itemsMYPRN: TStringField
      FieldName = 'MYPRN'
      Size = 10
    end
    object itemsEXTYESNO: TIntegerField
      FieldName = 'EXTYESNO'
    end
    object itemsFIDATE: TDateTimeField
      FieldName = 'FIDATE'
    end
  end
  object tel: TTable
    TableName = 'tel.db'
    Left = 496
    Top = 320
    object telId: TAutoIncField
      FieldName = 'Id'
      ReadOnly = True
    end
    object telTel: TStringField
      FieldName = 'Tel'
      Size = 30
    end
  end
  object getNEXTC: TStoredProc
    DatabaseName = 'pos'
    StoredProcName = 'GETNEXTC'
    Left = 504
    Top = 160
  end
  object contdet: TQuery
    DatabaseName = 'server'
    SQL.Strings = (
      'insert into'
      'CONTACTDET ('
      '  MId,'
      '  POINTIN ,'
      '  POINTOUT,'
      '  DDATE ,'
      '  DTIME ,'
      '  TOTAL ,'
      ' currfac'
      ')'
      
        'values(:mymid,:mypointin,:mypointout,:mydate,:mytime,:mytotal,:m' +
        'ycurrfac)')
    Left = 376
    Top = 464
    ParamData = <
      item
        DataType = ftInteger
        Name = 'mymid'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'mypointin'
        ParamType = ptUnknown
      end
      item
        DataType = ftCurrency
        Name = 'mypointout'
        ParamType = ptUnknown
      end
      item
        DataType = ftDate
        Name = 'mydate'
        ParamType = ptUnknown
      end
      item
        DataType = ftDateTime
        Name = 'mytime'
        ParamType = ptUnknown
      end
      item
        DataType = ftCurrency
        Name = 'mytotal'
        ParamType = ptUnknown
      end
      item
        DataType = ftInteger
        Name = 'mycurrfac'
        ParamType = ptUnknown
      end>
  end
  object docheck: TQuery
    DatabaseName = 'pos'
    SQL.Strings = (
      'CREATE PROCEDURE DOCHECK   AS  '
      'declare variable myvat VARCHAR(5);'
      ''
      'BEGIN'
      ''
      'select vattype from configs into ::myvat;'
      ''
      ''
      ''
      ''
      ''
      ''
      'if (myvat='#39'TTC'#39') then'
      'begin'
      
        'UPDATE CURRFAC SET TOTAL=(SELECT SUM(TOTAL) FROM ITEMS WHERE CUR' +
        'RFAC=CURRFAC.ID)-discount;'
      
        'UPDATE CURRFAC SET VAT=(SELECT SUM(vatamount) FROM ITEMS WHERE C' +
        'URRFAC=CURRFAC.ID);'
      'UPDATE CURRFAC SET SUBTOTAL=TOTAL-VAT+discount;'
      'end'
      'else'
      'begin'
      
        'UPDATE CURRFAC SET TOTAL=(SELECT SUM(TOTAL+vatamount) FROM ITEMS' +
        ' WHERE CURRFAC=CURRFAC.ID)-discount;'
      
        'UPDATE CURRFAC SET VAT=(SELECT SUM(vatamount) FROM ITEMS WHERE C' +
        'URRFAC=CURRFAC.ID);'
      'UPDATE CURRFAC SET SUBTOTAL=TOTAL-VAT+discount;'
      'end'
      ''
      ''
      'end')
    Left = 504
    Top = 408
  end
  object checkpro: TStoredProc
    DatabaseName = 'pos'
    StoredProcName = 'docheck'
    Left = 480
    Top = 464
  end
  object conttrig1: TQuery
    DatabaseName = 'server'
    SQL.Strings = (
      
        'CREATE TRIGGER CONTACTLISTTRIGGER3 FOR CONTACTLIST BEFORE UPDATE' +
        ' POSITION 0 AS'
      'BEGIN'
      
        'if (new.cradno is null or new.cradno='#39#39') then new.cradno='#39':'#39'||ne' +
        'w.wphone;'
      'END')
    Left = 48
    Top = 480
  end
  object conttrig2: TQuery
    DatabaseName = 'server'
    SQL.Strings = (
      
        'CREATE TRIGGER CONTACTLISTTRIGGER4 FOR CONTACTLIST BEFORE INSERT' +
        ' POSITION 1 AS'
      'BEGIN'
      
        'if (new.cradno is null or new.cradno='#39#39') then new.cradno='#39':'#39'||ne' +
        'w.wphone;'
      'END')
    Left = 104
    Top = 488
  end
  object abcSingleInstance1: TabcSingleInstance
    StopMsg = 'The Program Already Running'
    OnPreviousInstance = abcSingleInstance1PreviousInstance
    Left = 112
    Top = 8
  end
  object abcSplash1: TabcSplash
    Duration = 2000
    Picture.Data = {
      [encoded data, 165120 characters]
      F48DFD99A40CF1E447FF00A057A4E8DFF20FB7FA1A28AC7A17D4FFD9}
    ShowModal = True
    AutoShow = True
    Left = 248
    Top = 344
  end
end
