GpStructuredStorage file  !7 "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~sqli.vtd sqliForm.vtdSsqliFormName.vtd. sqliStep.vtd=IsqliStepFile.vtd8sqliStepStr.vtd6sqliStepStrEvent.vtd sqliVar.vtd2 sqliVer.vtdsqliReports.vtdsqliTranslation.vtd rACKEYACNAMEd ACISDEBUGACTYPE ACVARININI ACAUTOSTART ACAUTOCLOSE ACENDMESSAGEACLOCALIZATION2ACFORMNAMEAUTHORACACTIVE ANVERSION ACLOGTYPE ACINSTCODEd ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS ACISLOCALIZEDACRUNONINSTALL ACRUNONUPDATE ACRUNONDELETE ANOLDVERSION ACCRYPTPASSACCOMPILEDSCRIPTACNOTEA00000ESprememba davne stopnjeFAFFFTRT0BBFFFF ACKEY ACFORMNAME2 ACDOCTYPE ACOBJECTNAME2ACTYPE ACKEYSHORTCUT2ACTABSHEETNAME2 ACFORMTYPE ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS A00000E PrometSprCeneD1|e(BB ACFORMNAME2ACNAME2ACKEYANNOACVIEWACSETOFACDESCRACREPORTACFILECREATETABLEANFILEDELIMITER ACFILENAMEACFILETABLENAME ACFILEDEST ACFILETYPE ACFILETYPEXML ACSHOWIFEMPTYACTITLEBUTTONS ANTITLELINESANBEGINFROMRECORD ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS ACCHARSET2 ACSTYLESHEET ACUNITNAMEd ACNEWTHREADACDFMACPAS ACSQLEXPORT2ACSQLEXPACNOTEA00000EGPFAENF@)B0)aB windows-1250Popravilo davnih stopenjFProgram AresScript; uses sysutils, classes, forms, dialogs, FForm1; begin ares.executeStep(10); Form1 := tForm1.create(ares); ares.run; end. A00000EGFFAENF@B0)aB windows-1250FForm1FAobject Form1: TForm Tag = 99 Left = 208 Top = 233 Caption = 'Popravilo dav'#269'nih stopenj' ClientHeight = 321 ClientWidth = 317 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False Position = poDesigned PixelsPerInch = 96 TextHeight = 13 object cxGrid1: TcxGrid Left = 0 Top = 52 Width = 317 Height = 269 Align = alClient TabOrder = 0 ExplicitTop = 30 ExplicitHeight = 291 object cxGrid1DBTableView1: TcxGridDBTableView NavigatorButtons.ConfirmDelete = False DataController.DataSource = DataSourceVAT DataController.Summary.DefaultGroupSummaryItems = <> DataController.Summary.FooterSummaryItems = <> DataController.Summary.SummaryGroups = <> OptionsData.Appending = True OptionsView.GroupByBox = False object cxGrid1DBTableView1Column1: TcxGridDBColumn Caption = #352'ifra iz' DataBinding.FieldName = 'acVATfrom' PropertiesClassName = 'TdlcxLookupComboBoxProperties' Properties.ClearKey = 46 Properties.DropDownAutoSize = True Properties.GridMode = True Properties.ImmediatePost = True Properties.IncrementalFiltering = False Properties.KeyFieldNames = 'acVATCode' Properties.ListColumns = <> Properties.ListOptions.SyncMode = True Properties.PostPopupValueOnTab = True Properties.ShowFieldNameValue = True Properties.LookupType = ltTarSt Properties.VisibleButtons = [lbDropDown, lbEllipsisButton] Width = 131 end object cxGrid1DBTableView1Column2: TcxGridDBColumn Caption = #352'ifra na' DataBinding.FieldName = 'acVATto' PropertiesClassName = 'TdlcxLookupComboBoxProperties' Properties.ClearKey = 46 Properties.DropDownAutoSize = True Properties.GridMode = True Properties.ImmediatePost = True Properties.IncrementalFiltering = False Properties.KeyFieldNames = 'acVATCode' Properties.ListColumns = <> Properties.ListOptions.SyncMode = True Properties.PostPopupValueOnTab = True Properties.ShowFieldNameValue = True Properties.LookupType = ltTarSt Properties.VisibleButtons = [lbDropDown, lbEllipsisButton] Width = 132 end end object cxGrid1Level1: TcxGridLevel GridView = cxGrid1DBTableView1 end end object dlcxPanel1: TdlcxPanel Left = 0 Top = 0 Width = 317 Height = 52 Align = alTop TabOrder = 1 object fBase: TdlcxLabeledImageComboBox Left = 80 Top = 6 AutoSize = False EditValue = 'M' Properties.Items = < item Description = 'Cena brez davka' Value = 'M' end item Description = 'Cena z davkom' ImageIndex = 0 Value = 'P' end> Properties.ReadOnly = False Properties.ClearValue = Null Style.BorderStyle = ebsFlat Style.Color = 15065304 Style.LookAndFeel.Kind = lfFlat Style.LookAndFeel.NativeStyle = False Style.Shadow = False Style.ButtonStyle = btsSimple Style.ButtonTransparency = ebtAlways Style.PopupBorderStyle = epbsDefault StyleDisabled.LookAndFeel.Kind = lfFlat StyleDisabled.LookAndFeel.NativeStyle = False StyleFocused.Color = 14347503 StyleFocused.LookAndFeel.Kind = lfFlat StyleFocused.LookAndFeel.NativeStyle = False StyleHot.LookAndFeel.Kind = lfFlat StyleHot.LookAndFeel.NativeStyle = False TabOrder = 0 LabelPosition = lpoLeft LabelSpacing = 3 LabelVisible = True EditLabel.Left = 40 EditLabel.Top = 9 EditLabel.Width = 37 EditLabel.Height = 13 EditLabel.Caption = 'Osnova' EditLabel.FocusControl = fBase EditLabel.Transparent = True ComponentSize = csSmall Templatable = False Caption = 'Osnova' ReadOnly = False Height = 19 Width = 110 end object bStart: TdlcxButton Left = 224 Top = 5 Width = 75 Height = 22 Caption = 'Po'#382'eni' Default = True TabOrder = 1 end object cbVPPrice: TdlcxCheckBox Left = 40 Top = 27 Caption = 'Sprememba VP1 in VP2' State = cbsChecked TabOrder = 2 Transparent = True Visible = False Width = 138 end end object lbMsg2: TdlcxLabel Left = 198 Top = 277 Caption = 'Ni podatkov!' Visible = False end object lbMsg1: TdlcxLabel Left = 198 Top = 259 Caption = 'Operacija kon'#269'ana!' Visible = False end object _evsaver: TEventCom events = 'fBase.Properties.OnEditValueChanged=fBasePropertiesEditValueChan' + 'ged'#13#10 end object tbVAT: TdlDataset SQL.Strings = ( 'select * from #lHE_VATchg') FieldNamesToUpperCase = False AutoCalcFields = False Cached = False LocateInsert = False Editable = True RequestLive = False KeyFields = 'acVATfrom' QueryRecCount = False DetailDelay = 0 LocalMasterDetail = False StrictUpdate = False TrimFixedChar = True TrimVarChar = True AddRowidToSQL = False ORACompatibility = True Left = 130 Top = 137 end object DataSourceVAT: TDataSource DataSet = tbVAT Left = 181 Top = 133 end end unit FForm1; interface uses Forms, Controls, StdCtrls, SysUtils, Classes, Graphics, dlComponents, Dialogs, cxGrid, dlDatabase, db; type TForm1 = class(TarForm) cxGrid1: TcxGrid; cxGrid1DBTableView1: TcxGridDBTableView; cxGrid1Level1: TcxGridLevel; dlcxPanel1: TdlcxPanel; fBase: TdlcxLabeledImageComboBox; cxGrid1DBTableView1Column1: TcxGridDBColumn; cxGrid1DBTableView1Column2: TcxGridDBColumn; tbVAT: TdlDataset; DataSourceVAT: TDataSource; bStart: TdlcxButton; lbMsg2: TdlcxLabel; lbMsg1: TdlcxLabel; cbVPPrice: TdlcxCheckBox; procedure fBasePropertiesEditValueChanged(Sender: TObject); procedure bStartClick(Sender: TObject); private tbHead: TdlDataset; public constructor Create(AOwner: TComponent); override; end; var Form1: TForm1; implementation constructor TForm1.Create(AOwner: TComponent); begin inherited Create(AOwner); ares.AssignObjectsToForm('FForm1',Self); cxGrid1 := FindComponent('cxGrid1'); cxGrid1DBTableView1 := FindComponent('cxGrid1DBTableView1'); cxGrid1Level1 := FindComponent('cxGrid1Level1'); dlcxPanel1 := FindComponent('dlcxPanel1'); fBase := FindComponent('fBase'); cxGrid1DBTableView1Column1 := FindComponent('cxGrid1DBTableView1Column1'); cxGrid1DBTableView1Column2 := FindComponent('cxGrid1DBTableView1Column2'); tbVAT := FindComponent('tbVAT'); DataSourceVAT := FindComponent('DataSourceVAT'); tbVAT.Open; bStart := FindComponent('bStart'); bStart.OnClick := bStartClick; lbMsg2 := FindComponent('lbMsg2'); lbMsg1 := FindComponent('lbMsg1'); AresFindComponent(cbVPPrice, 'cbVPPrice', Self); TdlcxImageComboBoxProperties(fBase.Properties).OnEditValueChanged := fBasePropertiesEditValueChanged; end; procedure TForm1.bStartClick(Sender: TObject); var ds: TdlDataSet; i: integer; begin tbHead := TdlDataset(OwnerForm.FindComponent('tbPrometSprCene')); Ares.Variables['cKeyChgPrice'] := tbHead['acKey']; Ares.Variables['acWareHouse'] := tbHead['acReceiver']; if (tbVat.State = dsInsert) or (tbVat.State = dsEdit) then tbVat.Post; ds := TdlDataset.create(nil); try ds.sql.text := 'select count(*) from tHE_SetItem M, #lHE_VATchg T where M.acVATCode = T.acVATfrom'; ds.open; if not ds.eof then i:= ds.Fields[0].AsInteger else i:= 0; ds.close; finally ds.free; end; if i > 0 then begin ares.executeStep(30); TdlDataset(OwnerForm.FindComponent('tbPrometSprCenePoz')).Refresh; //dlReopenTable('PrometSPrCene.tbPrometSprCene'); //dlReopenTable('SifMS.tbMS'); //dlReopenTable('SifMS.tbMSCenaSklad'); dlMessageDlg(lbMsg1.Caption, mtInformation, [mbOK], 0); //ShowMessage(lbMsg1.Caption); end else dlMessageDlg(lbMsg2.Caption, mtInformation, [mbOK], 0); //ShowMessage(lbMsg2.Caption); //dlReopenTable('SifMS.tbMS'); TdlDataset(OwnerForm.FindComponent('tbPrometSprCenePoz')).Refresh; end; procedure TForm1.fBasePropertiesEditValueChanged(Sender: TObject); begin if fBase.ItemIndex = 1 then cbVPPrice.Visible := True else cbVPPrice.Visible := False; end; end. A00000E GITEAENFlQBNB windows-125010F[begin delete lHE_VATchg; end; A00000EGETEAENF|(BNB windows-1250F-select * from ~P~UpdateTarSt~P~ order by TSIzA00000EGITEAENFBNB windows-125030FDECLARE cBankaCenik VARCHAR2(32); cNasaValuta VARCHAR2(3); nRoundT NUMBER(19,2); cIdent VARCHAR2(16); cValuta VARCHAR2(3); cIzracunKalk VARCHAR2(1); nNabaCena FLOAT(53); cTS VARCHAR2(2); nDavek FLOAT(53); nProdCena FLOAT(53); nMpCena FLOAT(53); nCena FLOAT(53); nMpCenaP FLOAT(53); nTecaj FLOAT(53); dDatum DATE; cSifMSSprMPCena VARCHAR2(1); cLocenaKalk VARCHAR2(1); cSkladisce VARCHAR2(30); cKeyChgPrice VARCHAR2(13); nNo NUMBER(10,0); cError VARCHAR2(1024); cStatus VARCHAR2(2); cWareHouse VARCHAR2(30); nMpCenaG FLOAT(53); nProdCenaG FLOAT(53); cSeparSaleCalc VARCHAR2(1); cVPPrice VARCHAR2(10); nWSPrice FLOAT(53); nWSPriceG FLOAT(53); nWSPrice2 FLOAT(53); nWSPrice2G FLOAT(53); nChPricePercent FLOAT(53); BEGIN cKeyChgPrice := '#cKeyChgPrice#'; cWareHouse := '#acWareHouse#'; cVPPrice := '#cbVPPrice#'; SELECT acBankPrice, acPrimCurrency, anRoundT, acSetsItemChRTPrice, acSeparSaleCalc INTO cBankaCenik, cNasaValuta, nRoundT, cSifMSSprMPCena, cLocenaKalk FROM vPA_SysParam ; dDatum := (substring (RPAD (TO_CHAR (SYSDATE, 'yyyy/mm/dd'), 10, ' '), 1, 10)); cNasaValuta := fHE_GetPrimCurrency(dDatum); FOR rec IN (SELECT M.acIdent, M.acCurrency, M.acMakeCalc, M.anBuyPrice, T.acVATCode, T.anVat, M.anSalePrice, M.anRTPrice, M.anPrice, M.anWSPrice, M.anWSPrice2 FROM tHE_Stock Z JOIN tHE_SetItem M ON M.acIdent = Z.acIdent JOIN lHE_VATchg P ON M.acVATCode = P.acVATfrom JOIN tHE_SetTax T ON T.acVATCode = P.acVATto WHERE Z.acWareHouse = cWareHouse) LOOP BEGIN cIdent := rec.acIdent; cValuta := rec.acCurrency; cIzracunKalk := rec.acMakeCalc; nNabaCena := rec.anBuyPrice; cTS := rec.acVATCode; nDavek := rec.anVat; nProdCena := rec.anSalePrice; nMpCena := rec.anRTPrice; nCena := rec.anPrice; nWSPrice := rec.anWSPrice; nWSPrice2 := rec.anWSPrice2; cSeparSaleCalc := 'F'; nProdCenaG := NULL; nMpCenaG := NULL; nWSPriceG := NULL; nWSPrice2G := NULL; FOR RecLocCalc IN (SELECT acSeparSaleCalc FROM tHE_SetSubj WHERE acSubject = cWareHouse) LOOP cSeparSaleCalc := RecLocCalc.acSeparSaleCalc; END LOOP; IF cSeparSaleCalc = 'T' THEN BEGIN FOR RecPrc IN (SELECT anSalePrice, anRTPrice, anWSPrice, anWSPrice2 FROM tHE_SetItemPriceForWrh WHERE acWareHouse = cWareHouse AND acIdent = cIdent) LOOP nProdCenaG := RecPrc.anSalePrice; nMpCenaG := RecPrc.anRTPrice; nWSPriceG := RecPrc.anWSPrice; nWSPrice2G := RecPrc.anWSPrice2; END LOOP; IF nProdCenaG IS NOT NULL THEN nProdCena := nProdCenaG; END IF; IF nMpCenaG IS NOT NULL THEN nMpCena := nMpCenaG; END IF; IF nWSPriceG IS NOT NULL THEN nWSPrice := nWSPriceG; END IF; IF nWSPrice2G IS NOT NULL THEN nWSPrice2 := nWSPrice2G; END IF; END; END IF; IF UPPER('#fBase#') = 'P' THEN BEGIN pPA_SearchFXRate(cBankaCenik, cValuta, dDatum, nTecaj); nTecaj := fHE_GetFxRateCurr(dDatum, nTecaj); nMpCena := nProdCena / (1 + (nDavek / 100)); nMpCenaP := 0; IF (nNabaCena <> 0) AND (nTecaj <> 0) THEN BEGIN IF cIzracunKalk = 'B' THEN nMPCenaP := 100 * ((nMPCena - (nCena * nTecaj)) / (nNabaCena * nTecaj)); ELSE nMPCenaP := 100 * ((nMPCena - (nNabaCena * nTecaj)) / (nNabaCena * nTecaj)); END IF; END; END IF; pHE_MoveItemsCreAll(cKeyChgPrice, cIdent, 0, '', ~U~, nNo, cError, cStatus, 0, 1, '', -1, '', -1, 0, '', ''); IF cStatus = 'T' THEN BEGIN UPDATE tHE_MoveItem SET anRtPriceP = nMpCena, acVATCode = cTS, acVATCodeTr = cTS, anVAT = nDavek, anVATIn = nDavek WHERE acKey = cKeyChgPrice AND anno = nNo; IF cVPPrice = 'True' THEN BEGIN SELECT CASE WHEN NVL(P.anSalePrice,0) = 0 THEN 0 ELSE 100 * (P.anRTPriceP - P.anSalePrice) / P.anSalePrice END INTO nChPricePercent FROM tHE_MoveItem P WHERE acKey = cKeyChgPrice AND anNo = nNo; nWSPrice := nWSPrice * (1+(nChPricePercent/100)); nWSPrice2 := nWSPrice2 * (1+(nChPricePercent/100)); UPDATE tHE_MoveItem SET anWSPrice2P = nWSPrice, anTransport = nWSPrice2 WHERE acKey = cKeyChgPrice AND anno = nNo; END; END IF; END; END IF; END; ELSE BEGIN nProdCena := nMpCena * (1 + (nDavek / 100)); pPa_RoundFin(nProdCena, nRoundT, nProdCena); pHE_MoveItemsCreAll(cKeyChgPrice, cIdent, 0, '', ~U~, nNo, cError, cStatus, 0, 1, '', -1, '', -1, 0, '', ''); IF cStatus = 'T' THEN BEGIN UPDATE tHE_MoveItem SET anRtPrice = nProdCena, acVATCode = cTS, acVATCodeTr = cTS, anVAT = nDavek, anVATIn = nDavek, anRebate = nProdCena - anWSPrice WHERE acKey = cKeyChgPrice AND anno = nNo; END; END IF; END; END IF; END; END LOOP; END; ACKEYANNOANSEQNOACHFIELD2ACHTYPE ANHLENGTHANHDECACPFIELD2ACPTYPEANPLEGTHANPDEC ACPFORMAT ACPSEPARATOR ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS ACKEYANNOANSEQNO ACFIELDNAME2 ANFIELDSIZE ACFIELDTITLEACFIELDREADONLY ACEDITTYPE ACFIELDCONST ACFIELDFORMATACFIELDDEFAULT ANUSERCHG ANUSERINS ADTIMEINS ADTIMECHG  ACKEYANNO ACDATAEVENTACDATARETURNVALUE ACKEYANDNO ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS ACKEY ACWHEREKEYANNO ACFIELDNAME ACPARAMVAR ACFIELDTYPE ACFIELDREQACFIELDCAPTION2 ACDEFAULTEXPACDEFAULTVALUE ACLOOKUPSQL ACOPERATOR ACVARHINT2 ACADDAPOSTROF ACPRTCRIT ANUSERCHG ANUSERINS ADTIMECHG ADTIMEINS A00000EOsnova OsnovaTCF+Osnova je P-Cena z davkom/M-Cena brez davka0MFT`ͨBB ACKEY ANVERSIONANNOACSQLEXPACNOTE ADTIMECHG ANUSERCHG ADTIMEINS ANUSERINSACREPORTACLANGIDACLOCALIZATION2 ACFORMNAMEdACNAMEdACDEFAULTPRINTER ACPREVIEWANMAXPRSTLEVELACSUBSTITUTESIGNACPRINTIFEMPTY ACPRINTTOTEXT ANNOOFCOPY ACORDERBY ACREGUSERCODEACACTIVE ACKEYSHORTCUT2 ANUSERINS ADTIMEINS ANUSERCHG ADTIMECHG ACTEXT1ACTEXT2ACTEXT3ACNOTE ACREPORTDATAACKEY ACUNITNAME ACOBJECTNAME ACTRANSLATIONACLOCALISATION