File: rd.pl

package info (click to toggle)
sql-ledger 3.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 35,524 kB
  • ctags: 4,556
  • sloc: perl: 64,519; sql: 28,330; sh: 34; makefile: 21
file content (54 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#=====================================================================
# SQL-Ledger ERP
# Copyright (c) DWS Systems Inc.
#
#  Author: DWS Systems Inc.
#     Web: http://www.sql-ledger.com
#
#======================================================================
#
# Reference Documents
#
#======================================================================

1;

sub reference_documents {

  $form->{reference_rows} ||= 1;
  $form->{reference_rows}++ if $form->{"referenceid_$form->{reference_rows}"};

  $_ = qq|
	    <table>
	      <tr class=listheading>
		<th class=listheading colspan=2>|.$locale->text('Reference Documents').qq|</th>
	      </tr>
|;

  for $i (1 .. $form->{reference_rows}) {
    $_ .= qq|
	      <tr>
		<td><input name="referencedescription_$i" size=20 value="|.$form->quote($form->{"referencedescription_$i"}).qq|"></td>
		<td><input name="referenceid_$i" size=10 value="$form->{"referenceid_$i"}">
|;

    if ($form->{referenceurl}) {
      $_ .= qq|
		<a href=$form->{referenceurl}$form->{"referenceid_$i"} target=_blank>?</a>
|;
    }

    $_ .= qq|
		</td>
	      </tr>
|;
  }

  $_ .= qq|
	    </table>
|;

  $_;

}