View Issue Details

IDProjectCategoryView StatusLast Update
0001733Database ComparerGeneralpublic2022-01-13 22:40
Reportershirokov Assigned Tobarry  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version8.0.0.2400 
Target Version8.0.0.2400 
Summary0001733: When comparing functions, Numeric comes without parameters
DescriptionThis is the original function. Firebird 3.0

CREATE OR ALTER FUNCTION BRUTTO(
 BETRAG NUMERIC(9,2),
 DATUM TIMESTAMP)
RETURNS NUMERIC(9,2) DETERMINISTIC
AS
declare variable MWST numeric(9,2);
begin
 if ( BETRAG is null or (DATUM is null )) then
 begin
 return NULL;
 end
 DATUM = ZEIT_NULLEN( DATUM );

/* Berechnet den Bruttobetrag unter Berücksichtigung des richtigen MwSt Satzes
 anhand des übergebenen Datums. Benutzt die Tabelle MwSt_Saetze */
 select first (1) SATZ from MWST_SAETZE A
 where :DATUM >= A.ab_datum
 order by AB_DATUM DESC /* Order BY ist wichtig nur so kommt immer der richtige Satz */
 into :MWST;
 return ( BETRAG * (( MWST / 100 )+1));
end;

If the database comparator finds a difference, the input/return values of the type "Numeric becomes Integer" only with variable parameters the type is OK.


CREATE OR ALTER FUNCTION BRUTTO(
 BETRAG INTEGER, <-- Integer should be Numeric(9,2) !!!
 DATUM TIMESTAMP)
RETURNS INTEGER <-- Integer should be Numeric(9,2) !!!
AS
declare variable MWST numeric(9,2);
begin
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-01-13 21:36 shirokov New Issue
2022-01-13 21:36 shirokov Status new => assigned
2022-01-13 21:36 shirokov Assigned To => barry
2022-01-13 22:40 shirokov Description Updated View Revisions