FCLT#90062 Toleranter maken van referentieherkenning in factuurimport

svn path=/Database/branches/DB52/; revision=70890
This commit is contained in:
Jos Groot Lipman
2025-11-11 12:36:43 +00:00
parent 269e729f2c
commit 7d258160c3
2 changed files with 16 additions and 11 deletions

View File

@@ -15976,10 +15976,11 @@ AS
-- - An optional prefix of up to 3 letters,
-- - Followed by 1 to 10 digits,
-- - Optionally followed by a slash and a sequence number (e.g., ST0123456/2).
-- Note: NOT used for contract id's. They are freeform.
-- Examples:
-- 'C12345 Somecomments' -> 'C12345'
-- 'Sometext C12345' -> 'C12345'
-- 'SometextC12345' -> 'xtC12345' (!)
-- 'M12345 Somecomments' -> 'M12345'
-- 'Sometext M12345' -> 'M12345'
-- 'SometextM12345' -> 'xtM12345' (!)
-- 'ST0123456/2 extra' -> 'ST0123456/2'
FUNCTION sanitizereferentiestring (p_broc_nr IN VARCHAR2)
RETURN VARCHAR2
@@ -15987,7 +15988,7 @@ AS
cleaner_broc_nr fac_imp_factuur.ordernr%TYPE;
BEGIN
-- Extract pattern: up to 3 letters, 1-10 digits, optional /digits
cleaner_broc_nr := REGEXP_SUBSTR (p_broc_nr, '([A-Za-z]{0,3}\d{1,10}(\/\d+)?)', 1);
cleaner_broc_nr := REGEXP_SUBSTR (p_broc_nr, fac.getsetting('fin_factuur_import_sanitize_id'), 1); -- default'([A-Za-z]{0,3}\d{1,10}(\/\d+)?)'
IF cleaner_broc_nr IS NULL
THEN
cleaner_broc_nr := p_broc_nr;
@@ -16031,19 +16032,22 @@ AS
p_ckey:=NULL;
p_okey:=NULL;
p_bkey:=NULL;
sanitized_broc_nr := sanitizereferentiestring (p_broc_nr);
IF LENGTH (sanitized_broc_nr) > 0
IF LENGTH (p_broc_nr) > 0
THEN
p_ckey := try_getcontract_id (sanitized_broc_nr, p_leverancier_nr, p_factuur_datum);
p_ckey := try_getcontract_id (p_broc_nr, p_leverancier_nr, p_factuur_datum); -- Unsanitized p_broc_nr!
IF p_ckey IS NULL
THEN
p_okey := try_getopdracht_id (sanitized_broc_nr, p_leverancier_nr);
IF p_okey IS NULL
sanitized_broc_nr := sanitizereferentiestring (p_broc_nr);
IF LENGTH (sanitized_broc_nr) > 0
THEN
p_bkey := try_getbestelling_id (sanitized_broc_nr, p_leverancier_nr);
p_okey := try_getopdracht_id (sanitized_broc_nr, p_leverancier_nr);
IF p_okey IS NULL
THEN
p_bkey := try_getbestelling_id (sanitized_broc_nr, p_leverancier_nr);
END IF;
END IF;
END IF;
END IF;
END IF;
END;
FUNCTION try_getkostensoort (p_ckey IN NUMBER, p_okey IN NUMBER, p_bkey IN NUMBER)

View File

@@ -576,6 +576,7 @@ DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_factuur_flags'
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_factuur_flags_list_usage' , 'number' , '0' , 'Set rights that readonly can/cannot edit markings (bolletjes) toe {0=no | 1=yes}')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_factuur_verlegdmode' , 'number' , '0' , 'Use and validation of field fin_factuur_gbedrag: {0=field invisible | &1=visible and enterable | &2=required if invoicelines has a shifted VAT-value | &4=all invoicelines must have shifted VAT-value or must have standard VAT values (=not shifted)}')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_kostensoort_verplicht' , 'number' , '0' , 'Is kostensoort required? {0=not required | 1=required}')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_factuur_import_sanitize_id' , 'string' , '([A-Za-z]{0,3}\d{1,10}(\/\d+)?)', 'Regexp for sanitizing imported invoice ID''s (removes unwanted characters)')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_match_lowerlimit' , 'number' , '0' , 'Check lowerlimit also for matching {0=Only upperlimit (invoice<order+tolerance | 1=Upper and lowerlimit (order-tolerance<invoice<order+tolerance)}')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_new_after_save' , 'number' , '0' , 'Na het opslaan terugkomen met de factuur in de showmode of met nieuw leeg invulformulier (0=showmode || 1=nieuw formulier)')
DEFINE_SETTING('FIN', 0001, 'WEB_PRSSYS', 'fin_splitsen_omschr' , 'number' , '0' , 'Split up the discription of the invoice lines? {0=no (default) | 1=yes}')