LandrixSoftware / XRechnung-for-Delphi

XRechnung Implementation for Delphi
GNU General Public License v3.0
18 stars 6 forks source link

TInvoiceUnitCodeHelper.MapUnitOfMeasure with empty _UnitOfMeasure should return _Success:=false #24

Closed MicrotronX closed 1 month ago

MicrotronX commented 1 month ago

IMHO the _Success should be false when _UnitOfMeasue = '', right?

class function TInvoiceUnitCodeHelper.MapUnitOfMeasure(_UnitOfMeasure: String; out _Success: Boolean; _DefaultOnFailure: TInvoiceUnitCode): TInvoiceUnitCode; begin Result := _DefaultOnFailure; _Success := false; _UnitOfMeasure := Trim(_UnitOfMeasure); if _UnitOfMeasure = '' then begin _Success := true; ->> sollte doch false sein?? exit; end; --- snip ---

landrix commented 1 month ago

done