summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 3b8e79ca..55b563dc 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -507,6 +507,21 @@ sub round_amount {
return $amount;
}
+sub callproc {
+ my $procname = shift @_;
+ my $argstr = "";
+ my @results;
+ for (1 .. $#_){
+ $argstr .= "?, ";
+ }
+ $argstr =~ s/\, $//;
+ $query = "SELECT $procname($argstr)";
+ my $sth = $form->{dbh}->prepare($query);
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)){
+ push @results, $ref;
+ }
+ @results;
+}
sub parse_template {