my ($self, $str, $cols, $maxrows) = @_;
my ($self, $str, $cols, $maxrows) = @_;
my ($stylesheet, $favicon);
if ($ENV{HTTP_USER_AGENT}) {
my ($stylesheet, $favicon);
if ($ENV{HTTP_USER_AGENT}) {
sub show_generic_error {
my ($self, $error, $title, $action) = @_;
sub show_generic_error {
my ($self, $error, $title, $action) = @_;
- my $add_params = {};
- $add_params->{"title"} = $title if ($title);
- $self->{"label_error"} = $error;
+ my $add_params = {
+ 'title_error' => $title,
+ 'label_error' => $error,
+ };
- my ($self, $error, $title) = @_;
+ my ($self, $text, $title) = @_;
+
+ my $add_params = {
+ 'title_information' => $title,
+ 'label_information' => $text,
+ };
- bin_list => $main::locale->text('Bin List'),
- credit_note => $main::locale->text('Credit Note'),
- invoice => $main::locale->text('Invoice'),
- packing_list => $main::locale->text('Packing List'),
- pick_list => $main::locale->text('Pick List'),
- proforma => $main::locale->text('Proforma Invoice'),
- purchase_order => $main::locale->text('Purchase Order'),
- request_quotation => $main::locale->text('RFQ'),
- sales_order => $main::locale->text('Confirmation'),
- sales_quotation => $main::locale->text('Quotation'),
- storno_invoice => $main::locale->text('Storno Invoice'),
- storno_packing_list => $main::locale->text('Storno Packing List'),
+ bin_list => $main::locale->text('Bin List'),
+ credit_note => $main::locale->text('Credit Note'),
+ invoice => $main::locale->text('Invoice'),
+ packing_list => $main::locale->text('Packing List'),
+ pick_list => $main::locale->text('Pick List'),
+ proforma => $main::locale->text('Proforma Invoice'),
+ purchase_order => $main::locale->text('Purchase Order'),
+ request_quotation => $main::locale->text('RFQ'),
+ sales_order => $main::locale->text('Confirmation'),
+ sales_quotation => $main::locale->text('Quotation'),
+ storno_invoice => $main::locale->text('Storno Invoice'),
+ storno_packing_list => $main::locale->text('Storno Packing List'),
$main::lxdebug->enter_sub();
my ($self, $dbh, $curr, $transdate, $buy, $sell) = @_;
$main::lxdebug->enter_sub();
my ($self, $dbh, $curr, $transdate, $buy, $sell) = @_;
my ($currency) = selectrow_query($self, $dbh, $query);
my ($defaultcurrency) = split m/:/, $currency;
my ($currency) = selectrow_query($self, $dbh, $query);
my ($defaultcurrency) = split m/:/, $currency;
WHERE e.curr = ? AND e.transdate = ?
FOR UPDATE|;
my $sth = prepare_execute_query($self, $dbh, $query, $curr, $transdate);
WHERE e.curr = ? AND e.transdate = ?
FOR UPDATE|;
my $sth = prepare_execute_query($self, $dbh, $query, $curr, $transdate);
$main::lxdebug->enter_sub();
my ($self, $dbh, $curr, $transdate, $fld) = @_;
$main::lxdebug->enter_sub();
my ($self, $dbh, $curr, $transdate, $fld) = @_;
my ($currency) = selectrow_query($self, $dbh, $query);
my ($defaultcurrency) = split m/:/, $currency;
my ($currency) = selectrow_query($self, $dbh, $query);
my ($defaultcurrency) = split m/:/, $currency;
WHERE e.curr = ? AND e.transdate = ?|;
my ($exchangerate) = selectrow_query($self, $dbh, $query, $curr, $transdate);
WHERE e.curr = ? AND e.transdate = ?|;
my ($exchangerate) = selectrow_query($self, $dbh, $query, $curr, $transdate);
- $self->_get_customers($dbh, $params{"customers"});
+ if (ref $params{"customers"} eq 'HASH') {
+ $self->_get_customers($dbh, $params{"customers"}{key}, $params{"customers"}{limit});
+ } else {
+ $self->_get_customers($dbh, $params{"customers"});
+ }
- $self->_get_vendors($dbh, $params{"vendors"});
+ if (ref $params{"vendors"} eq 'HASH') {
+ $self->_get_vendors($dbh, $params{"vendors"}{key}, $params{"vendors"}{limit});
+ } else {
+ $self->_get_vendors($dbh, $params{"vendors"});
+ }
LEFT JOIN taxkeys tk ON (tk.chart_id = c.id)
WHERE c.link LIKE ?
AND (tk.id = (SELECT id FROM taxkeys WHERE taxkeys.chart_id = c.id AND startdate <= $transdate ORDER BY startdate DESC LIMIT 1)
LEFT JOIN taxkeys tk ON (tk.chart_id = c.id)
WHERE c.link LIKE ?
AND (tk.id = (SELECT id FROM taxkeys WHERE taxkeys.chart_id = c.id AND startdate <= $transdate ORDER BY startdate DESC LIMIT 1)
WHERE (formname = ?) AND (trans_id = ?)|;
do_query($self, $dbh, $query, $self->{formname}, $self->{id});
WHERE (formname = ?) AND (trans_id = ?)|;
do_query($self, $dbh, $query, $self->{formname}, $self->{id});