Revision c6268fe0
Von Thomas Kasulke vor fast 18 Jahren hinzugefügt
SL/RP.pm | ||
---|---|---|
1195 | 1195 |
$main::lxdebug->leave_sub(); |
1196 | 1196 |
} |
1197 | 1197 |
|
1198 |
sub get_storno { |
|
1199 |
$main::lxdebug->enter_sub(); |
|
1200 |
my ($self, $dbh, $form) = @_; |
|
1201 |
my $query = qq|SELECT invnumber FROM $form->{arap} WHERE invnumber LIKE "Storno zu "|; |
|
1202 |
my $sth = $dbh->prepare($query); |
|
1203 |
while(my $ref = $sth->fetchrow_hashref()) { |
|
1204 |
$ref->{invnumer} =~ s/Storno zu //g; |
|
1205 |
$form->{storno}{$ref->{invnumber}} = 1; |
|
1206 |
} |
|
1207 |
$main::lxdebug->leave_sub(); |
|
1208 |
} |
|
1209 |
|
|
1198 | 1210 |
sub aging { |
1199 | 1211 |
$main::lxdebug->enter_sub(); |
1200 | 1212 |
|
... | ... | |
1206 | 1218 |
|
1207 | 1219 |
$form->{todate} = $form->current_date($myconfig) unless ($form->{todate}); |
1208 | 1220 |
|
1209 |
my $where = "1 = 1";
|
|
1221 |
my $where = " 1 = 1 ";
|
|
1210 | 1222 |
my ($name, $null); |
1211 | 1223 |
|
1212 | 1224 |
if ($form->{"$form->{ct}_id"}) { |
... | ... | |
1260 | 1272 |
WHERE $form->{arap}.curr = exchangerate.curr |
1261 | 1273 |
AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate |
1262 | 1274 |
FROM $form->{arap}, $form->{ct} |
1263 |
WHERE paid != amount |
|
1275 |
WHERE paid != amount |
|
1276 |
AND $form->{arap}.storno IS FALSE |
|
1264 | 1277 |
AND $form->{arap}.$form->{ct}_id = $form->{ct}.id |
1265 | 1278 |
AND $form->{ct}.id = $id |
1266 | 1279 |
AND ( |
... | ... | |
1282 | 1295 |
WHERE $form->{arap}.curr = exchangerate.curr |
1283 | 1296 |
AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate |
1284 | 1297 |
FROM $form->{arap}, $form->{ct} |
1285 |
WHERE paid != amount |
|
1298 |
WHERE paid != amount |
|
1299 |
AND $form->{arap}.storno IS FALSE |
|
1286 | 1300 |
AND $form->{arap}.$form->{ct}_id = $form->{ct}.id |
1287 | 1301 |
AND $form->{ct}.id = $id |
1288 | 1302 |
AND ( |
... | ... | |
1304 | 1318 |
WHERE $form->{arap}.curr = exchangerate.curr |
1305 | 1319 |
AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate |
1306 | 1320 |
FROM $form->{arap}, $form->{ct} |
1307 |
WHERE paid != amount |
|
1321 |
WHERE paid != amount |
|
1322 |
AND $form->{arap}.storno IS FALSE |
|
1308 | 1323 |
AND $form->{arap}.$form->{ct}_id = $form->{ct}.id |
1309 | 1324 |
AND $form->{ct}.id = $id |
1310 | 1325 |
AND ( |
... | ... | |
1326 | 1341 |
WHERE $form->{arap}.curr = exchangerate.curr |
1327 | 1342 |
AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate |
1328 | 1343 |
FROM $form->{arap}, $form->{ct} |
1329 |
WHERE paid != amount |
|
1344 |
WHERE paid != amount |
|
1345 |
AND $form->{arap}.storno IS FALSE |
|
1330 | 1346 |
AND $form->{arap}.$form->{ct}_id = $form->{ct}.id |
1331 | 1347 |
AND $form->{ct}.id = $id |
1332 | 1348 |
AND transdate < (date '$form->{todate}' - interval '90 days') |
Auch abrufbar als: Unified diff
/Stornierte (Forderungen|Verbindlichkeiten)/ werden bei offene $1 nicht mehr angezeigt/