#===================================================================== # SQL-Ledger # Copyright (c) DWS Systems Inc. # # Author: DWS Systems Inc. # Web: http://www.sql-ledger.com # #====================================================================== # # Maintainance module # #====================================================================== use SL::SM; use SL::IS; use SL::IR; require "$form->{path}/js.pl"; 1; # end of main sub repost_invoices { # enter a date for which to repost invoices # reverse invoices and save in temporary tables # post vendor invoices then sales invoices $form->helpref("repost_invoices", $myconfig{countrycode}); $form->{title} = $locale->text('Repost Invoices'); $form->header; &calendar; print qq|
$form->{helpref}$form->{title}
|.$locale->text('Beginning date').qq| |.&js_calendar("main", "transdate").qq|


|; $form->{nextsub} = "do_repost_invoices"; $form->hide_form(qw(nextsub path login)); print qq|
|; } sub do_repost_invoices { $form->isblank('transdate', $locale->text('Date missing!')); $form->header; print $locale->text('Reposting Invoices ... '); if ($ENV{HTTP_USER_AGENT}) { print "".$locale->text('please wait')."\n"; } else { print $locale->text('please wait')."\n"; } $SIG{INT} = 'IGNORE'; open(FH, ">$userspath/$myconfig{dbname}.LCK") or $form->error($!); close(FH); $err = SM->repost_invoices(\%myconfig, \%$form, $userspath); unlink "$userspath/$myconfig{dbname}.LCK"; if ($err == -1) { $form->error($locale->text('AR account does not exist!')); } if ($err == -2) { $form->error($locale->text('AP account does not exist!')); } print "... ".$locale->text('done')."\n"; } sub fld_config { # list formnames # pick one to edit } sub fld_edit { } sub fld_save { } sub continue { &{ $form->{nextsub} } };