Revision 653ae9ea
Von Philip Reetz vor mehr als 16 Jahren hinzugefügt
SL/RP.pm | ||
---|---|---|
1303 | 1303 |
|
1304 | 1304 |
$form->{todate} = $form->current_date($myconfig) unless ($form->{todate}); |
1305 | 1305 |
my $todate = conv_dateq($form->{todate}); |
1306 |
my $fromdate = conv_dateq($form->{fromdate}); |
|
1307 |
|
|
1308 |
my $fromwhere = ($form->{fromdate} ne "") ? " AND (transdate >= (date $fromdate)) " : ""; |
|
1306 | 1309 |
|
1307 | 1310 |
my $where = " 1 = 1 "; |
1308 | 1311 |
my ($name, $null); |
... | ... | |
1338 | 1341 |
AND (${arap}.storno IS FALSE) |
1339 | 1342 |
AND (${arap}.${ct}_id = ${ct}.id) |
1340 | 1343 |
AND (${ct}.id = ?) |
1341 |
AND (transdate <= (date $todate)) |
|
1344 |
AND (transdate <= (date $todate) $fromwhere )
|
|
1342 | 1345 |
|
1343 | 1346 |
ORDER BY ctid, transdate, invnumber |; |
1344 | 1347 |
|
... | ... | |
1352 | 1355 |
WHERE $where |
1353 | 1356 |
AND (a.${ct_id} = ct.id) |
1354 | 1357 |
AND ((a.paid != a.amount) OR ((a.datepaid > $todate) AND (datepaid is NOT NULL))) |
1355 |
AND (a.transdate <= $todate) |
|
1358 |
AND (a.transdate <= $todate $fromwhere)
|
|
1356 | 1359 |
ORDER BY ct.name|; |
1357 | 1360 |
|
1358 | 1361 |
my $sth = prepare_execute_query($form, $dbh, $query); |
bin/mozilla/rp.pl | ||
---|---|---|
189 | 189 |
$value_2 = ""; |
190 | 190 |
$trigger_2 = "trigger2"; |
191 | 191 |
} elsif (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) { |
192 |
$name_1 = ""; |
|
193 |
$id_1 = ""; |
|
194 |
$value_1 = ""; |
|
195 |
$trigger_1 = ""; |
|
192 |
$name_1 = "fromdate";
|
|
193 |
$id_1 = "fromdate";
|
|
194 |
$value_1 = "$form->{fromdate}";
|
|
195 |
$trigger_1 = "trigger1";
|
|
196 | 196 |
$name_2 = "todate"; |
197 | 197 |
$id_2 = "todate"; |
198 | 198 |
$value_2 = ""; |
... | ... | |
788 | 788 |
<td>$vc</td> |
789 | 789 |
</tr> |
790 | 790 |
<tr> |
791 |
<th align=right>| . $locale->text('Bis') . qq|</th> |
|
792 |
<td> |
|
793 |
$button1 |
|
794 |
$button1_2 |
|
791 |
<td align=left colspan=4>| . $locale->text('From') . qq| |
|
792 |
$button1 |
|
793 |
$button1_2 |
|
794 |
| . $locale->text('Bis') . qq| |
|
795 |
$button2 |
|
796 |
$button2_2 |
|
795 | 797 |
</td> |
796 | 798 |
</tr> |
797 | 799 |
<input type=hidden name=type value=statement> |
... | ... | |
1666 | 1668 |
|
1667 | 1669 |
sub aging { |
1668 | 1670 |
$lxdebug->enter_sub(); |
1669 |
print(STDERR "Bin in Aging\n"); |
|
1671 |
|
|
1670 | 1672 |
$auth->assert('general_ledger'); |
1671 | 1673 |
|
1672 | 1674 |
my $report = SL::ReportGenerator->new(\%myconfig, $form); |
... | ... | |
1714 | 1716 |
$form->{title} = sprintf($locale->text('Ap aging on %s'), $form->{todate}); |
1715 | 1717 |
} |
1716 | 1718 |
|
1717 |
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); |
|
1719 |
if ($form->{fromdate}) { |
|
1720 |
push @options, $locale->text('for Period') . " " . $locale->text('From') . " " .$locale->date(\%myconfig, $form->{fromdate}, 1) . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); |
|
1721 |
} else { |
|
1722 |
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); |
|
1723 |
} |
|
1718 | 1724 |
|
1719 | 1725 |
my $attachment_basename = $form->{ct} eq 'customer' ? $locale->text('ar_aging_list') : $locale->text('ap_aging_list'); |
1720 | 1726 |
|
Auch abrufbar als: Unified diff
Eingrenzung nach Datum bei offene Forderungen und Verbindlichkeiten