summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--C4/Letters.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/C4/Letters.pm b/C4/Letters.pm
index 4acc931..519c0f6 100644
--- a/C4/Letters.pm
+++ b/C4/Letters.pm
@@ -652,7 +652,10 @@ sub _parseletter {
652 652
653 $val = GetAuthorisedValueByCode ('ROADTYPE', $val, 0) if $table=~/^borrowers$/ && $field=~/^streettype$/; 653 $val = GetAuthorisedValueByCode ('ROADTYPE', $val, 0) if $table=~/^borrowers$/ && $field=~/^streettype$/;
654 my $replacedby = defined ($val) ? $val : ''; 654 my $replacedby = defined ($val) ? $val : '';
655 if ( $replacedby and $replacedby =~ m|^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?$| ) { 655 if ( $replacedby
656 and not $replacedby =~ m|0000-00-00|
657 and $replacedby =~ m|^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?$| )
658 {
656 # If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date 659 # If the value is XXXX-YY-ZZ[ AA:BB:CC] we assume it is a date
657 my $dateonly = defined $1 ? 0 : 1; #$1 refers to the capture group wrapped in parentheses. In this case, that's the hours, minutes, seconds. 660 my $dateonly = defined $1 ? 0 : 1; #$1 refers to the capture group wrapped in parentheses. In this case, that's the hours, minutes, seconds.
658 eval { 661 eval {