# total expenses and inventory
# sellprice is the cost of the item
- my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ($ref->{price_factor} * ( $basefactor || 1 )), 2);
+ my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ( ($ref->{price_factor} || 1) * ( $basefactor || 1 )), 2);
if (!$main::eur) {
$ref->{expense_accno} = ($form->{"expense_accno_$row"}) ? $form->{"expense_accno_$row"} : $ref->{expense_accno};
return $result;
}
+sub get_standard_accno_current_assets {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq| SELECT accno FROM chart WHERE id = (SELECT ar_paid_accno_id FROM defaults)|;
+ my ($result) = selectrow_query($form, $dbh, $query);
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $result;
+}
+
1;