Revision 2676fca9
Von Thomas Kasulke vor fast 18 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
433 | 433 |
<script type="text/javascript" src="js/tabcontent.js"> |
434 | 434 |
|
435 | 435 |
/*********************************************** |
436 |
* Tab Content script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
|
|
436 |
* Tab Content script- Dynamic Drive DHTML code library (www.dynamicdrive.com) |
|
437 | 437 |
* This notice MUST stay intact for legal use |
438 | 438 |
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code |
439 | 439 |
***********************************************/ |
... | ... | |
1696 | 1696 |
$main::lxdebug->leave_sub(); |
1697 | 1697 |
} |
1698 | 1698 |
|
1699 |
|
|
1700 | 1699 |
sub language_payment { |
1701 | 1700 |
$main::lxdebug->enter_sub(); |
1702 | 1701 |
|
... | ... | |
2216 | 2215 |
$main::lxdebug->leave_sub(); |
2217 | 2216 |
} |
2218 | 2217 |
|
2218 |
#--- 4 locale ---# |
|
2219 |
# $main::locale->text('SAVED') |
|
2220 |
# $main::locale->text('DELETED') |
|
2221 |
# $main::locale->text('ADDED') |
|
2222 |
# $main::locale->text('PAYMENT POSTED') |
|
2223 |
# $main::locale->text('POSTED') |
|
2224 |
# $main::locale->text('POSTED AS NEW') |
|
2225 |
# $main::locale->text('ELSE') |
|
2226 |
# $main::locale->text('SAVED FOR DUNNING') |
|
2227 |
# $main::locale->text('DUNNING STARTED') |
|
2228 |
# $main::locale->text('PRINTED') |
|
2229 |
# $main::locale->text('MAILED') |
|
2230 |
# $main::locale->text('SCREENED') |
|
2231 |
# $main::locale->text('invoice') |
|
2232 |
# $main::locale->text('proforma') |
|
2233 |
# $main::locale->text('sales_order') |
|
2234 |
# $main::locale->text('packing_list') |
|
2235 |
# $main::locale->text('pick_list') |
|
2236 |
# $main::locale->text('purchase_order') |
|
2237 |
# $main::locale->text('bin_list') |
|
2238 |
# $main::locale->text('sales_quotation') |
|
2239 |
# $main::locale->text('request_quotation') |
|
2240 |
|
|
2241 |
sub save_history { |
|
2242 |
$main::lxdebug->enter_sub(); |
|
2243 |
|
|
2244 |
my $self = shift(); |
|
2245 |
my $dbh = shift(); |
|
2246 |
|
|
2247 |
if(!exists $self->{employee_id}) { |
|
2248 |
&get_employee($self, $dbh); |
|
2249 |
} |
|
2250 |
|
|
2251 |
my $query = qq|INSERT INTO status (trans_id, employee_id, addition, what_done) |
|
2252 |
VALUES ($self->{id}, $self->{employee_id}, '$self->{addition}', '$self->{what_done}')|; |
|
2253 |
$dbh->do($query) || $self->dberror($query); |
|
2254 |
|
|
2255 |
$main::lxdebug->leave_sub(); |
|
2256 |
} |
|
2257 |
|
|
2258 |
sub get_history { |
|
2259 |
$main::lxdebug->enter_sub(); |
|
2260 |
|
|
2261 |
my $self = shift(); |
|
2262 |
my $dbh = shift(); |
|
2263 |
my $trans_id = shift(); |
|
2264 |
my $restriction = shift(); |
|
2265 |
my @tempArray; |
|
2266 |
my $i = 0; |
|
2267 |
if($trans_id ne ""){ |
|
2268 |
my $query = qq|SELECT st.employee_id, st.itime, st.addition, st.what_done, emp.name |
|
2269 |
FROM status st |
|
2270 |
LEFT JOIN employee emp |
|
2271 |
ON emp.id = st.employee_id |
|
2272 |
WHERE trans_id = $trans_id| |
|
2273 |
. $restriction; |
|
2274 |
|
|
2275 |
my $sth = $dbh->prepare($query) || $self->dberror($query); |
|
2276 |
|
|
2277 |
$sth->execute() || $self->dberror($query); |
|
2278 |
|
|
2279 |
while(my $hash_ref = $sth->fetchrow_hashref()) { |
|
2280 |
$hash_ref->{addition} = $main::locale->text($hash_ref->{addition}); |
|
2281 |
$hash_ref->{what_done} = $main::locale->text($hash_ref->{what_done}); |
|
2282 |
$tempArray[$i++] = $hash_ref; |
|
2283 |
} |
|
2284 |
return \@tempArray if ($i > 0 && $tempArray[0] ne ""); |
|
2285 |
} |
|
2286 |
return 0; |
|
2287 |
$main::lxdebug->leave_sub(); |
|
2288 |
} |
|
2289 |
|
|
2219 | 2290 |
sub save_status { |
2220 | 2291 |
$main::lxdebug->enter_sub(); |
2221 | 2292 |
|
... | ... | |
2226 | 2297 |
my $formnames = $self->{printed}; |
2227 | 2298 |
my $emailforms = $self->{emailed}; |
2228 | 2299 |
|
2229 |
my $query = qq|DELETE FROM status
|
|
2230 |
WHERE formname = '$self->{formname}'
|
|
2231 |
AND trans_id = $self->{id}|; |
|
2300 |
$query = qq|DELETE FROM status |
|
2301 |
WHERE formname = '$self->{formname}' |
|
2302 |
AND trans_id = $self->{id}|;
|
|
2232 | 2303 |
$dbh->do($query) || $self->dberror($query); |
2233 | 2304 |
|
2234 | 2305 |
# this only applies to the forms |
Auch abrufbar als: Unified diff
Historie eingefügt