[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: closing timecards?
- Subject: Re: closing timecards?
- From: Jeff Kowalczyk <..hidden..>
- Date: Fri, 14 Nov 2008 15:53:35 -0500
On Fri, 14 Nov 2008 19:56:39 +0000, Chris Calef wrote:
> Hi,
>
> Could anyone possibly fill me in on how timecards are marked as open or
> closed? My clients tell me that they used to be able to mark this in
> SQL-Ledger, and that they were marked as closed when they called Generate
> Sales Order, but I can't find anything in jcitems that seems to indicate
> active status. Is it somewhere else?
Looking at my own timecards, the open ones have 0 (zero) in the
jcitems.allocated column.
A search (not tracing through the code) give a likely candidate as the
first match, testing for "open" timecards as jcitems.qty !=
jcitems.allocated:
$ ack -B 3 -A 4 allocated LedgerSMB/JC.pm
}
if ( $form->{open} || $form->{closed} ) {
unless ( $form->{open} && $form->{closed} ) {
$where .= " AND j.qty != j.allocated" if $form->{open};
$where .= " AND j.qty = j.allocated"
if $form->{closed};
}
}
--
}
$query = qq|
SELECT j.id, j.description, j.qty, j.allocated,
to_char(j.checkedin, 'HH24:MI') AS checkedin,
to_char(j.checkedout, 'HH24:MI') AS checkedout,
to_char(j.checkedin, 'yyyymmdd') AS transdate,
to_char(j.checkedin, ?) AS transdatea,
--
for (qw(inhour inmin insec outhour outmin outsec)) {
$form->{$_} = substr( "00$form->{$_}", -2 );
}
for (qw(qty sellprice allocated)) {
$form->{$_} = $form->parse_amount( $myconfig, $form->{$_} );
}
my $checkedin = "$form->{inhour}$form->{inmin}$form->{insec}";
--
parts_id = ?,
description = ?,
qty = ?,
allocated = ?,
sellprice = ?,
fxsellprice = ?,
serialnumber = ?,
checkedin = ?::timestamp,
--
$parts_id,
$form->{description},
$form->{qty},
$form->{allocated},
$form->{sellprice},
$form->{sellprice},
$form->{serialnumber},
"$form->{transdate} $form->{inhour}:$form->{inmin}:" . $form->{insec},