X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=21508383067ac8023d3f6d64fec8cb82a5374ea3;hb=4dd73ccf0cbde1fe4e8ecf05839028c24312828a;hp=d6cbc0b7c792f266c9401957c02349a48aad4c87;hpb=becc49b1374f60cd4c8b389490859e92a99ae572;p=kivitendo-erp.git
diff --git a/SL/Form.pm b/SL/Form.pm
index d6cbc0b7c..215083830 100644
--- a/SL/Form.pm
+++ b/SL/Form.pm
@@ -382,8 +382,8 @@ function fokus(){document.$self->{fokus}.focus();}
$jsscript = qq|
-
-
+
+
$self->{javascript}
|;
}
@@ -450,25 +450,25 @@ sub write_trigger {
$trigger_1 = qq|
Calendar.setup(
- {
- inputField : "$inputField_1",
- ifFormat :"$ifFormat",
- align : "$align_1",
- button : "$button_1"
- }
- );
+ {
+ inputField : "$inputField_1",
+ ifFormat :"$ifFormat",
+ align : "$align_1",
+ button : "$button_1"
+ }
+ );
|;
if ($qty == 2) {
$trigger_2 = qq|
Calendar.setup(
{
- inputField : "$inputField_2",
- ifFormat :"$ifFormat",
- align : "$align_2",
- button : "$button_2"
- }
- );
+ inputField : "$inputField_2",
+ ifFormat :"$ifFormat",
+ align : "$align_2",
+ button : "$button_2"
+ }
+ );
|;
}
$jsscript = qq|
@@ -2120,6 +2120,38 @@ sub get_partsgroup {
}
+sub get_pricegroup {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $p) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.pricegroup
+ FROM pricegroup p|;
+
+ $query .= qq|
+ ORDER BY pricegroup|;
+
+ if ($p->{all}) {
+ $query = qq|SELECT id, pricegroup FROM pricegroup
+ ORDER BY pricegroup|;
+ }
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $self->{all_pricegroup} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_pricegroup} }, $ref;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+
sub audittrail {
my ($self, $dbh, $myconfig, $audittrail) = @_;