Skip to content

Commit

Permalink
Merge pull request #40 from ledgersmb/1.3
Browse files Browse the repository at this point in the history
sync over 1.3 branch
  • Loading branch information
ehuelsmann committed Aug 22, 2014
2 parents 7d6e3e9 + c5fb18a commit faed7c5
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Changelog for 1.3 Series
Initial Release: Monday, Oct 12 2011
Supported Presently

Changelog for 1.3.42
* Fixed #1184 invalid numeric format on payment search field, where date was used instead of amount (Pongracz I)
* Fix for missing emails when emailing orders/quotations (1073, Chris T)

Pongracz I is Pongracz Istvan

Changelog for 1.3.41
* Fix for invalid ref when entering payment (John Locke)

Expand Down
32 changes: 30 additions & 2 deletions LedgerSMB/AA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,8 @@ sub get_name {
entity.control_code AS entity_control_code,
co.tax_id AS tax_id,
c.meta_number, ecl.*, ctf.default_reportable,
c.cash_account_id, ca.accno as cash_accno
c.cash_account_id, ca.accno as cash_accno,
c.id as eca_id
FROM entity_credit_account c
JOIN entity ON (entity.id = c.entity_id)
LEFT JOIN account ca ON c.cash_account_id = ca.id
Expand Down Expand Up @@ -1346,7 +1347,34 @@ sub get_name {
for ( keys %$ref ) { $form->{$_} = $ref->{$_} }
$sth->finish;

# TODO: Retrieve contact records
# get customer e-mail accounts
$query = qq|SELECT * FROM eca__list_contacts(?)
WHERE class_id BETWEEN 12 AND ?
ORDER BY class_id DESC;|;
my %id_map = ( 12 => 'email',
13 => 'cc',
14 => 'bcc',
15 => 'email',
16 => 'cc',
17 => 'bcc' );
$sth = $dbh->prepare($query);
$sth->execute( $form->{eca_id}, 14) || $form->dberror( $query );

my $ctype;
my $billing_email = 0;
while ( $ref = $sth->fetchrow_hashref('NAME_lc') ) {
$ctype = $ref->{class_id};
$ctype = $id_map{$ctype};
$billing_email = 1
if $ref->{class_id} == 15;

# If there's an explicit billing email, don't use
# the standard email addresses; otherwise fall back to standard
$form->{$ctype} .= ($form->{$ctype} ? ", " : "") . $ref->{contact}
if (($ref->{class_id} < 15 && ! $billing_email)
|| $ref->{class_id} >= 15);
}
$sth->finish;

my $buysell = ( $form->{vc} eq 'customer' ) ? "buy" : "sell";

Expand Down
12 changes: 12 additions & 0 deletions doc/release_notes
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,18 @@ payment reversal, or gl workflows. Failure to do so may cause the payment to
fail to be recognized by existing in-process reconciliation workflows. If this
happens, start the bank reconciliation over and the payment will be recognized.

3.6: Assemblies and COGS

Assemblies and COGS have a couple of important shortcomings in 1.3 and before
which are fixed in 1.4. The two important cases which can cause COGS to be misrecorded are:

1. BOM changes between when assembly is stocked and when assembly is sold
2. Selling assembly before all parts necessary to manufacture are in stock

In both these cases, COGS can be misrecorded. This is a problem going back to
the SQL-Ledger codebase. Those who are doing significant work with assemblies
should move to 1.4 as soon as possible.

4: Differences between LedgerSMB and SQL-Ledger(TM)

4.1: Login name restrictions
Expand Down
4 changes: 2 additions & 2 deletions scripts/payment.pl
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@ sub payment1_5 {
dateto => { name => 'dateto',
value => $request->{dateto}},
amountfrom => { name => 'amountfrom',
value => $request->{datefrom}},
value => $request->{amountfrom}},
amountto => { name => 'amountto',
value => $request->{dateto}},
value => $request->{amountto}},
accountclass => { name => 'account_class',
value => $dbPayment->{account_class}},
type => { name => 'type',
Expand Down

0 comments on commit faed7c5

Please sign in to comment.