Skip to content

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
my-ijet committed Jan 31, 2023
1 parent f9a6722 commit 1331dbe
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Script/script.dcu

Large diffs are not rendered by default.

22 changes: 21 additions & 1 deletion Script/spravochniky.pas
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ procedure Tarifikation_BtnClearFilterNadbavky_OnClick (Sender: TObject; var Canc
// Надбавки

// Доплаты
procedure Tarifikation_TableDoplaty_OnChange (Sender: TObject);
var
ColumnSumma : Integer;
begin
ColumnSumma := 3;
if Tarifikation.TableDoplaty.Columns[ColumnSumma] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableDoplaty.Columns[ColumnSumma]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
end;
end;

procedure Tarifikation_CheckFilterDoplataArchived_OnClick (Sender: TObject);
begin
Tarifikation.BtnFilterDoplaty.Click;
Expand All @@ -144,6 +154,16 @@ procedure Tarifikation_BtnClearFilterDoplaty_OnClick (Sender: TObject; var Cance
// Доплаты

// Ставки
procedure Tarifikation_TableStavky_OnChange (Sender: TObject);
var
ColumnSumma : Integer;
begin
ColumnSumma := 1;
if Tarifikation.TableStavky.Columns[ColumnSumma] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableStavky.Columns[ColumnSumma]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
end;
end;

procedure Tarifikation_CheckFilterStavkaArchived_OnClick (Sender: TObject);
begin
Tarifikation.BtnFilterStavky.Click;
Expand Down Expand Up @@ -282,7 +302,7 @@ procedure Tarifikation_BtnOrganizationsToArchive_OnClick (Sender: TObject; var C
end;
// Кнопки отправки в архив


// Статистика использования ФИО сотрудника в тарификации
procedure Tarifikation_TablePersons_OnCellClick (Sender: TObject; ACol, ARow: Integer);
var
PersonId, NumOfTarifikations : String;
Expand Down
70 changes: 65 additions & 5 deletions Script/tarifikation.pas
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,71 @@ procedure Tarifikation_BtnClearFilterTarJobDoplaty_OnClick (Sender: TObject; var
end;
// Фильтр таблицы Доплат для Должностей

// Формат таблиц и футера
procedure Tarifikation_TableTarifikaciya_OnChange (Sender: TObject);
var
Column : Integer;
begin
for Column:=6 to 6 do begin
if Tarifikation.TableTarifikaciya.Columns[Column] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableTarifikaciya.Columns[Column]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
Tarifikation.TableTarifikaciya.Columns[Column].Footer.FormatMaskKind := mkFloat;
Tarifikation.TableTarifikaciya.Columns[Column].Footer.FormulaKind := fkSum;
Tarifikation.TableTarifikaciya.Columns[Column].Footer.TextBefore := ' ';
Tarifikation.TableTarifikaciya.Columns[Column].Footer.FormatMask := '#,###,##0.00';
end;
end;
Tarifikation.TableTarifikaciya.CalculateFooter;
end;

procedure Tarifikation_TableTarJobs_OnChange (Sender: TObject);
var
Column : Integer;
begin
for Column:=1 to 12 do begin
if Tarifikation.TableTarJobs.Columns[Column] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableTarJobs.Columns[Column]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
Tarifikation.TableTarJobs.Columns[Column].Footer.FormatMaskKind := mkFloat;
Tarifikation.TableTarJobs.Columns[Column].Footer.FormulaKind := fkSum;
Tarifikation.TableTarJobs.Columns[Column].Footer.TextBefore := ' ';
Tarifikation.TableTarJobs.Columns[Column].Footer.FormatMask := '#,###,##0.00';
end;
end;
Tarifikation.TableTarJobs.CalculateFooter;
end;

procedure Tarifikation_TableTarNadbavky_OnChange (Sender: TObject);
var
Column : Integer;
begin
for Column:=1 to 3 do begin
if Tarifikation.TableTarNadbavky.Columns[Column] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableTarNadbavky.Columns[Column]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
Tarifikation.TableTarNadbavky.Columns[Column].Footer.FormatMaskKind := mkFloat;
Tarifikation.TableTarNadbavky.Columns[Column].Footer.FormulaKind := fkSum;
Tarifikation.TableTarNadbavky.Columns[Column].Footer.TextBefore := ' ';
Tarifikation.TableTarNadbavky.Columns[Column].Footer.FormatMask := '#,###,##0.00';
end;
end;
Tarifikation.TableTarNadbavky.CalculateFooter;
end;

procedure Tarifikation_TableTarJobDoblaty_OnChange (Sender: TObject);
var
Column : Integer;
begin
for Column:=1 to 5 do begin
if Tarifikation.TableTarJobDoblaty.Columns[Column] is TNxNumberColumn then begin
TNxNumberColumn(Tarifikation.TableTarJobDoblaty.Columns[Column]).FormatMask := '#,###,##0.00'; // Маска для колонки с деньгами
Tarifikation.TableTarJobDoblaty.Columns[Column].Footer.FormatMaskKind := mkFloat;
Tarifikation.TableTarJobDoblaty.Columns[Column].Footer.FormulaKind := fkSum;
Tarifikation.TableTarJobDoblaty.Columns[Column].Footer.TextBefore := ' ';
Tarifikation.TableTarJobDoblaty.Columns[Column].Footer.FormatMask := '#,###,##0.00';
end;
end;
Tarifikation.TableTarJobDoblaty.CalculateFooter;
end;
// Формат таблиц и футера

// Новая Тарификация
procedure Tarifikation_BtnNewTarifikaciya_OnClick (Sender: TObject; var Cancel: boolean);
Expand Down Expand Up @@ -627,11 +692,6 @@ procedure Tarifikation_PrepareTarTables;
Tarifikation.BtnFilterTarNadbavky.Click;
Tarifikation.BtnFilterTarJobs.Click;
Tarifikation.BtnFilterTarJobDoplaty.Click;

// Tarifikation_DoFilterTableTarifikaciya;
// Tarifikation_DoFilterTableTarNadbavky;
// Tarifikation_DoFilterTableTarJobs;
// Tarifikation_DoFilterTableTarJobDoblaty;
end;

procedure Tarifikation_OnShow (Sender: TObject; Action: string);
Expand Down
8 changes: 4 additions & 4 deletions Script/tarifikation_forms.pas
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ procedure frmEditTarJob_CalculateAllFields;
KategorySumma := Nagruzka * KategoryCoeff;
Stavka := Nagruzka + KategorySumma;

frmEditTarJob.TotalOklad.Text := FormatFloat('0.##', TotalOklad);
frmEditTarJob.Nagruzka.Text := FormatFloat('0.##', Nagruzka);
frmEditTarJob.KategorySumma.Text := FormatFloat('0.##', KategorySumma);
frmEditTarJob.Stavka.Text := FormatFloat('0.##', Stavka);
frmEditTarJob.TotalOklad.Text := FormatFloat('#,###,##0.##', TotalOklad);
frmEditTarJob.Nagruzka.Text := FormatFloat('#,###,##0.##', Nagruzka);
frmEditTarJob.KategorySumma.Text := FormatFloat('#,###,##0.##', KategorySumma);
frmEditTarJob.Stavka.Text := FormatFloat('#,###,##0.##', Stavka);
end;

procedure frmEditTarJob_CalculateClockCoeff;
Expand Down
Binary file modified forms.xml
Binary file not shown.
4 changes: 2 additions & 2 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ Tarifikation.TableTarJobs.ColCount=13
Tarifikation.TableTarJobs.0=80
Tarifikation.TableTarJobs.1=120
Tarifikation.TableTarJobs.2=95
Tarifikation.TableTarJobs.3=56
Tarifikation.TableTarJobs.4=33
Tarifikation.TableTarJobs.3=72
Tarifikation.TableTarJobs.4=36
Tarifikation.TableTarJobDoblaty.ColCount=6
Tarifikation.TableTarJobDoblaty.0=181
Tarifikation.TableTarJobDoblaty.1=185
Expand Down

0 comments on commit 1331dbe

Please sign in to comment.