Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
landrix committed Nov 10, 2020
1 parent 1bec6bf commit e5ae2ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Samples/XRechnungUnit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ procedure TForm1.Button1Click(Sender: TObject);
Memo1.Clear;
Memo2.Clear;
Memo3.Clear;
pnStartDragX122.Visible := false;
pnStartDragX200.Visible := false;
btX122ConvertHTML.Visible := false;
btX200ConvertHTML.Visible := false;

Expand Down Expand Up @@ -210,8 +208,6 @@ procedure TForm1.Button3Click(Sender: TObject);
Memo1.Clear;
Memo2.Clear;
Memo3.Clear;
pnStartDragX122.Visible := false;
pnStartDragX200.Visible := false;
btX122ConvertHTML.Visible := false;
btX200ConvertHTML.Visible := false;

Expand Down Expand Up @@ -460,8 +456,6 @@ procedure TForm1.Button4Click(Sender: TObject);
Memo1.Clear;
Memo2.Clear;
Memo3.Clear;
pnStartDragX122.Visible := false;
pnStartDragX200.Visible := false;
btX122ConvertHTML.Visible := false;
btX200ConvertHTML.Visible := false;

Expand Down Expand Up @@ -673,8 +667,7 @@ procedure TForm1.Generate122(inv: TInvoice);
Doc.Close;
end;
Memo1.Lines.Text := hstr;
pnStartDragX122.Visible := FileExists(ExtractFilePath(Application.ExeName)+'XRechnung-UBL-122.xml');
btX122ConvertHTML.Visible := pnStartDragX122.Visible;
btX122ConvertHTML.Visible := FileExists(ExtractFilePath(Application.ExeName)+'XRechnung-UBL-122.xml');
end;

procedure TForm1.Generate200(inv: TInvoice);
Expand All @@ -696,8 +689,7 @@ procedure TForm1.Generate200(inv: TInvoice);
Doc.Close;
end;
Memo2.Lines.Text := hstr;
pnStartDragX200.Visible := FileExists(ExtractFilePath(Application.ExeName)+'XRechnung-UBL-200.xml');
btX200ConvertHTML.Visible := pnStartDragX200.Visible;
btX200ConvertHTML.Visible := FileExists(ExtractFilePath(Application.ExeName)+'XRechnung-UBL-200.xml');
end;

end.
Expand Down
6 changes: 6 additions & 0 deletions intf.Invoice.pas
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ class function TInvoiceUnitCodeHelper.MapUnitOfMeasure(const _UnitOfMeasure: Str
_Success := false;
if _UnitOfMeasure.IsEmpty then
exit;
if SameText(_UnitOfMeasure,'st') or SameText(_UnitOfMeasure,'stk.') or SameText(_UnitOfMeasure,'stk') then
begin
result := iuc_piece;
_Success := true;
exit;
end;
if SameText(_UnitOfMeasure,'std') or SameText(_UnitOfMeasure,'std.') then
begin
result := iuc_hour;
Expand Down

0 comments on commit e5ae2ad

Please sign in to comment.