View | Details | Raw Unified | Return to bug 11273
Collapse All | Expand All

(-)a/C4/Barcodes/ValueBuilder.pm (-4 / +7 lines)
Lines 60-72 sub get_barcode { Link Here
60
    $nextnum = $year . $month . $nextnum;
60
    $nextnum = $year . $month . $nextnum;
61
    warn "New hbyymmincr Barcode = $nextnum" if $DEBUG;
61
    warn "New hbyymmincr Barcode = $nextnum" if $DEBUG;
62
    my $scr = "
62
    my $scr = "
63
        for (i=0 ; i<document.f.field_value.length ; i++) {
63
        var form = document.getElementById('f');
64
            if (document.f.tag[i].value == '$args->{loctag}' && document.f.subfield[i].value == '$args->{locsubfield}') {
64
        if ( !form ) {
65
            form = document.getElementById('Aform');
66
        }
67
        for (i=0 ; i<form.field_value.length ; i++) {
68
            if (form.tag[i].value == '$args->{loctag}' && form.subfield[i].value == '$args->{locsubfield}') {
65
                fnum = i;
69
                fnum = i;
66
            }
70
            }
67
        }
71
        }
68
    if (\$('#' + id).val() == '') {
72
    if (\$('#' + id).val() == '') {
69
        \$('#' + id).val(document.f.field_value[fnum].value + '$nextnum');
73
        \$('#' + id).val(form.field_value[fnum].value + '$nextnum');
70
    }
74
    }
71
    ";
75
    ";
72
    return $nextnum, $scr;
76
    return $nextnum, $scr;
73
- 

Return to bug 11273