Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4 refresh my repository before fixing hu.po #8

Merged
merged 122 commits into from
Jun 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
0e515f3
Fix LedgerSMB::App_State::User not being initialized correctly.
Apr 30, 2014
d85d790
Merge pull request #6 from ledgersmb/1.4
einhverfr May 22, 2014
866b18e
Only issue a password change request from JS if the password
May 26, 2014
9385d76
Revert accidental commit of CSS changes.
May 26, 2014
f022e34
Merge pull request #73 from ehuelsmann/1.4
einhverfr May 26, 2014
067e189
Fix #1150: User preference language dropdown not working.
May 27, 2014
3296569
Remove debugging statement.
May 27, 2014
f704291
Merge pull request #75 from ehuelsmann/1.4
einhverfr May 28, 2014
2ec834e
Fix import of AR/AP transaction batches.
May 29, 2014
528462a
Merge pull request #77 from ehuelsmann/1.4
einhverfr May 30, 2014
197a73c
Merge pull request #10 from ledgersmb/1.4
einhverfr May 30, 2014
1e1d9bf
Avoiding double render after import on failure
May 30, 2014
78059bd
Merge pull request #79 from einhverfr/1.4-import-rendering
einhverfr May 30, 2014
3508c79
Merge pull request #15 from ledgersmb/1.4
ehuelsmann May 30, 2014
f8dfd18
resolving conflicts on cherry-pick
einhverfr May 30, 2014
86b5915
Fixing conflicts from cherry-pickng
einhverfr May 30, 2014
24b752f
Merge pull request #81 from einhverfr/1.4_fixing_perm_update
einhverfr May 30, 2014
4837e78
Fix #1130: Can't attach file (PDF) to contact.
May 30, 2014
862f8c7
Re #1164: Add hidden 'batch_id' value.
May 30, 2014
f9c3378
Fix all buttons on single batch screen (fixes #1164 and #1163).
May 30, 2014
5d3cc07
Merge pull request #16 from ledgersmb/1.4
ehuelsmann May 30, 2014
ed21424
De-duplicate function naming.
May 31, 2014
4ecb0e2
Fix REVOKE statement.
May 31, 2014
4650edf
Merge pull request #83 from ehuelsmann/1.4
ehuelsmann May 31, 2014
f6a4fab
Fix #1154: ECA's locations table doesn't show country.
May 31, 2014
4628ee8
Merge pull request #87 from ehuelsmann/1.4
ehuelsmann May 31, 2014
7b60493
Follow-up commit to fix #1150, fixing all SELECT elements with OPTION…
May 31, 2014
08c2ade
Follow-up to fix #1150; now we have a newcode section, do we still ne…
May 31, 2014
0f1a467
Fix #1144: Contact 'Save as new' broken (action not defined).
May 31, 2014
349c01d
Fix button title in journal entry (now lists 'value').
May 31, 2014
6ef6466
Resolve #1143: 'Post as new' should be 'Save as new' (journal entry).
May 31, 2014
da7dfa5
Merge pull request #88 from ehuelsmann/1.4
einhverfr Jun 1, 2014
0421c43
Merge pull request #91 from ehuelsmann/1.4-ticket-1150
einhverfr Jun 1, 2014
b43b8d9
Merge pull request #92 from ehuelsmann/1.4-ticket-1144
einhverfr Jun 1, 2014
95c4eb9
Merge pull request #94 from ehuelsmann/1.4-gl-save-edit-button-caption
einhverfr Jun 1, 2014
66b614d
Merge pull request #12 from ledgersmb/1.4
einhverfr Jun 1, 2014
54d8164
Fixing assembly cogs issues
einhverfr Jun 1, 2014
7396c14
Merge pull request #96 from einhverfr/1.4_assembly_cogs
ehuelsmann Jun 1, 2014
765cf20
Merge pull request #20 from ledgersmb/1.4
ehuelsmann Jun 1, 2014
cdc94b1
LaTeX templates for statements
einhverfr Jun 1, 2014
a27cc08
Merging aging fixes
einhverfr Jun 1, 2014
3e78baa
Merging in more aging fixes
einhverfr Jun 1, 2014
2a45d6c
Adding 'use warnings' to report_aging.pm
einhverfr Jun 1, 2014
a06c964
Merge pull request #99 from einhverfr/1.4_statements
einhverfr Jun 1, 2014
d8bb51f
Merge pull request #22 from ledgersmb/1.4
ehuelsmann Jun 1, 2014
f57d629
Merge pull request #100 from ehuelsmann/1.4-ticket-1143
ehuelsmann Jun 1, 2014
7e07767
Merge pull request #23 from ledgersmb/1.4
ehuelsmann Jun 1, 2014
e115ab1
Merge pull request #14 from ledgersmb/1.4
einhverfr Jun 2, 2014
377f72d
initial cogs_line_report sql
einhverfr Jun 2, 2014
c7f9149
Fix #1166: Dates incorrectly showed in the web output (correctly in DB).
Jun 2, 2014
1caa389
Merge pull request #102 from ehuelsmann/1.4-ticket-1166
ehuelsmann Jun 3, 2014
6eec0fe
Marking 1.4 as a long-term branch
einhverfr Jun 3, 2014
cebf48d
Initial report class
einhverfr Jun 3, 2014
a0074a7
Adding filter screen
einhverfr Jun 3, 2014
4757498
Typing the COGS report into the workflow scripts
einhverfr Jun 3, 2014
78a6766
Basic COGS line report now works
einhverfr Jun 3, 2014
78f916b
Merging COGS type fix from master
einhverfr Jun 3, 2014
97a933c
Adding in missing pg-database.sql fix
einhverfr Jun 3, 2014
0935136
Merge pull request #104 from einhverfr/1.4
einhverfr Jun 3, 2014
ab087d8
Follow-up to fix for ticket #1166 (js fix)
Jun 3, 2014
944a233
Merge pull request #107 from ehuelsmann/1.4-ticket-1166
ehuelsmann Jun 3, 2014
5c6f261
Merge pull request #24 from ledgersmb/1.4
ehuelsmann Jun 3, 2014
6c3693c
Adding roles for COGS report
einhverfr Jun 4, 2014
025d6c6
Menu nodes added for COGS and inventory report
einhverfr Jun 3, 2014
42c9f82
Merge pull request #108 from einhverfr/1.4-cogs_report
einhverfr Jun 4, 2014
2522a02
Merge pull request #16 from ledgersmb/1.4
einhverfr Jun 4, 2014
35f027e
Fixing permissions for assembly lot tracking
einhverfr Jun 4, 2014
fbe8b85
Merge pull request #110 from einhverfr/1.4
einhverfr Jun 4, 2014
aa4a7fe
fixing bug 1103
einhverfr Jun 4, 2014
51c8b20
Merge pull request #113 from einhverfr/1.4
einhverfr Jun 4, 2014
5f58250
Consistency fixes for balance sheet
einhverfr Jun 4, 2014
ea7d3e3
Adding balance sheet latex template
einhverfr Jun 4, 2014
2fdd968
Moving pdf balance sheet template to correct extension
einhverfr Jun 4, 2014
01c589d
Initial PNL Latex template
einhverfr Jun 4, 2014
fb0fbe5
Renaming General Journal/Reports to General Journal/Search and GL
einhverfr Jun 4, 2014
64d29c6
Merge pull request #114 from einhverfr/1.4
einhverfr Jun 4, 2014
5585fe1
Merging new templates and consistency in HTML, more testing needed, b…
einhverfr Jun 4, 2014
da3a3af
Merge pull request #116 from einhverfr/1.4
einhverfr Jun 4, 2014
423a91f
Fixing syntax errors with pnl latex template, but some things don't w…
einhverfr Jun 5, 2014
261c301
Fully functional PDFs for PNL reports
einhverfr Jun 5, 2014
8a87cef
Fully functional balance sheet pdf's
einhverfr Jun 5, 2014
c72146f
Merge pull request #119 from einhverfr/1.4-pdf_bs_pnl
einhverfr Jun 5, 2014
501ca97
Role file to fix 1114
einhverfr Jun 5, 2014
c3149ba
Merge pull request #120 from einhverfr/1.4
einhverfr Jun 5, 2014
202af6f
Merge pull request #18 from ledgersmb/1.4
einhverfr Jun 5, 2014
f6c2b00
Adding logic to reverse manual taxes
einhverfr Jun 5, 2014
c505a67
Merging from github
einhverfr Jun 5, 2014
1aef062
adding basis reversal too
einhverfr Jun 5, 2014
9c87865
Merge pull request #26 from ledgersmb/1.4
ehuelsmann Jun 5, 2014
80d7ede
Merge pull request #123 from einhverfr/1.4
einhverfr Jun 6, 2014
cee9b17
Fixing badly named input that caused date selectors on some reports t…
einhverfr Jun 6, 2014
c006b3d
Merge pull request #126 from einhverfr/1.4
einhverfr Jun 6, 2014
9be1f2c
fix entry for changelog for tax reversal issue
einhverfr Jun 6, 2014
50bfac8
Fixing bug 1148, cannot attach url
einhverfr Jun 6, 2014
99ff822
Merge pull request #130 from einhverfr/1.4
einhverfr Jun 6, 2014
e77ae75
Merge pull request #20 from ledgersmb/1.4
einhverfr Jun 6, 2014
ee76f41
Merge pull request #28 from ledgersmb/1.4
ehuelsmann Jun 6, 2014
70da6e5
Fixes errors saving and deleting bank accounts
einhverfr Jun 7, 2014
b61ef1a
Merge pull request #133 from einhverfr/1.4
einhverfr Jun 7, 2014
fcb2615
Fixing business unit screen due to JS rewrite
einhverfr Jun 7, 2014
25ef682
Merging from github repo
einhverfr Jun 7, 2014
046bf64
Merge pull request #134 from einhverfr/1.4
einhverfr Jun 7, 2014
d347c7d
Follow up to (dd0565e2f8e6) fixing up the logic identifying tax accounts
Jun 7, 2014
3898582
Merge pull request #137 from ehuelsmann/1.4
ehuelsmann Jun 7, 2014
fb90663
Merge pull request #23 from ledgersmb/1.4
einhverfr Jun 8, 2014
acc09f0
Balance-only trial balance now available
einhverfr Jun 8, 2014
58803f1
Merge pull request #139 from einhverfr/1.4
einhverfr Jun 8, 2014
837f348
Adding css for business units screen
einhverfr Jun 8, 2014
2689439
Adding missing changelog entry
einhverfr Jun 8, 2014
4efa5b1
Merge pull request #142 from einhverfr/1.4
einhverfr Jun 8, 2014
be73995
Fixing sales tax rounding issue
einhverfr Jun 8, 2014
59da91c
Merge pull request #144 from einhverfr/1.4
einhverfr Jun 8, 2014
17f7f3b
Better fix for moneyplaces and sales tax
einhverfr Jun 8, 2014
43376a6
Merge pull request #148 from einhverfr/1.4
einhverfr Jun 8, 2014
1d60d35
check on account.category,cherry-picked from master
hvierendeels Jun 8, 2014
b138098
Merge pull request #150 from hvierendeels/1.4
einhverfr Jun 9, 2014
9973287
Migrating remark column for 1.3-1.4 conversions
einhverfr Jun 13, 2014
1c75fd1
Fixing load error on Company.sql
einhverfr Jun 13, 2014
8457521
Merge pull request #152 from einhverfr/1.4
einhverfr Jun 14, 2014
61a6cf2
Fixing web services for inventory entity
einhverfr Jun 14, 2014
5bd453e
better fix for web services for inventory entity
einhverfr Jun 15, 2014
99bcf91
Merge pull request #155 from einhverfr/1.4
einhverfr Jun 16, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Installation/Upgrade
* LaTeX format detection now run-time call, not configured (Chris T)
* configure_apache.sh: Add search for apache user & config path
Do not overwrite ledgersmb-httpd.conf without warning (Havard S)
* Validation of database schema load processes in setup.pl (Erik H)

Code/API improvements
* scripts/* files moved to make inheritance possible (Chris T)
Expand Down Expand Up @@ -115,6 +116,8 @@ Changelog for 1.3.40
* Fixed #1133 (FX rate changed after selecting part/service) (Pongracz I)
* Fixed #1078 (Don't populate all empty projects automatically) (Pongracz I)
* Fixed #1139 (Vendor can show up as default customer in sales order, confusing...) (Pongracz I)
* Fixed type mismatch between invoice.qty and invoice.allocated (Chris T)
* Fixed manual tax invoices not reversing properly (Chris T, 1134)

Chris T is Chris Travers
Pongracz I is Pongracz Istvan
Expand Down
4 changes: 3 additions & 1 deletion LedgerSMB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ sub close_form {

sub get_user_info {
my ($self) = @_;
$self->{_user} = LedgerSMB::User->fetch_config($self);
$LedgerSMB::App_State::User =
$self->{_user} =
LedgerSMB::User->fetch_config($self);
$self->{_user}->{language} ||= 'en';
}
#This function needs to be moved into the session handler.
Expand Down
5 changes: 1 addition & 4 deletions LedgerSMB/AA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,7 @@ sub post_transaction {
} else {
$batch_class = 'ap';
}
my $vqh = $dbh->prepare(
'SELECT * FROM batch
WHERE id = ? FOR UPDATE'
);
my $vqh = $dbh->prepare('SELECT * FROM batch__lock_for_update(?)');
$vqh->execute($form->{batch_id});
my $bref = $vqh->fetchrow_hashref('NAME_lc');
# Change the below to die with localization in 1.4
Expand Down
15 changes: 13 additions & 2 deletions LedgerSMB/Entity/Bank.pm
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ setting things like the id field.
sub save {
my ($self) = @_;
my ($ref) = $self->exec_method({funcname => 'entity__save_bank_account'});
$self->prepare_dbhash($ref);
$self = $self->new(%$ref);
}

=item delete
Expand All @@ -137,6 +135,19 @@ sub delete {
return $ref;
}

=over get($id)

Returns the account with the id.

=cut

sub get {
my ($self, $id) = @_;
my ($ref) = __PACKAGE__->call_procedure (procname => 'entity__get_bank_account',
args => [$id]);
return __PACKAGE__->new(%$ref);
}

=back

=head1 COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion LedgerSMB/Entity/Contact.pm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ contains either entity_id or credit_id, and location_id, and location class.

sub delete {
my ($ref) = @_;
if ($ref->{credit_id}){
if ($ref->{for_credit}){
__PACKAGE__->call_procedure(procname => 'eca__delete_contact',
args => [$ref->{credit_id}, $ref->{class_id},
$ref->{contact}]);
Expand Down
8 changes: 4 additions & 4 deletions LedgerSMB/Entity/Credit_Account.pm
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ The id for the AR or AP account, use for payment reversals. Required on save.

=cut

has 'ar_ap_account_id' => (is => 'rw', isa => 'Int', required => 1);
has 'ar_ap_account_id' => (is => 'rw', isa => 'Int');

=item cash_account_id

Expand Down Expand Up @@ -318,10 +318,10 @@ identified by $meta_number

sub get_by_meta_number {
my ($self, $meta_number, $entity_class) = @_;
my ($ref) = __PACKAGE__->call_procedure(procname => 'eca__get_by_met_number',
my ($ref) = __PACKAGE__->call_procedure(procname => 'eca__get_by_meta_number',
args => [$meta_number,
$entity_class]);
$ref->{tax_ids} = __PACKAGE__->_set_tax_ids($ref->{id});
$ref->{tax_ids} = __PACKAGE__->_get_tax_ids($ref->{id});
return __PACKAGE__->new(%$ref);
}

Expand Down Expand Up @@ -379,7 +379,7 @@ Saves the entity credit account. This also sets db defaults if not set.

sub save {
my ($self) = @_;
warn $self->{entity_class};
die 'No AR/AP Account ID Set' unless $self->ar_ap_account_id;
my ($ref) = $self->exec_method({funcname => 'eca__save'});
$self->{id}=$ref->{eca__save};
$self->exec_method(funcname => 'eca__set_taxes');
Expand Down
5 changes: 1 addition & 4 deletions LedgerSMB/GL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@ sub post_transaction {
if (not defined $form->{batch_id}){
$form->error($locale->text('Batch ID Missing'));
}
my $vqh = $dbh->prepare(
'SELECT * FROM batch
WHERE id = ? FOR UPDATE'
);
my $vqh = $dbh->prepare('SELECT * FROM batch__lock_for_update(?)');
$vqh->execute($form->{batch_id});
my $bref = $vqh->fetchrow_hashref('NAME_lc');
# Change the below to die with localization in 1.4
Expand Down
43 changes: 21 additions & 22 deletions LedgerSMB/IS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,6 @@ sub post_invoice {

}
}

# save detail record in invoice table
$query = qq|
INSERT INTO invoice (description)
Expand Down Expand Up @@ -1353,8 +1352,11 @@ sub post_invoice {
foreach $ref ( sort { $b->{amount} <=> $a->{amount} }
@{ $form->{acc_trans}{lineitems} } )
{
$diff ||= 0;
$ref->{fxdiff} ||= 0;

$amount = $ref->{amount} + $diff; # Subtracting included taxes

$query = qq|
INSERT INTO acc_trans
(trans_id, chart_id, amount,
Expand Down Expand Up @@ -1714,13 +1716,11 @@ sub process_assembly {
$project_id );
next;
}
else {
if ( $ref->{inventory_accno_id} ) {
$allocated =
&cogs( $dbh, $form, $ref->{parts_id}, $ref->{qty},
$project_id );
}
}
next unless $ref->{inventory_accno_id};

$allocated =
&cogs( $dbh, $form, $ref->{parts_id}, $ref->{qty},
$project_id );

$query = qq|
INSERT INTO invoice
Expand All @@ -1731,13 +1731,10 @@ sub process_assembly {

my $sth = $dbh->prepare($query);
$sth->execute( $form->{id}, $ref->{description}, $ref->{parts_id},
$ref->{qty}, $allocated, $ref->{unit} )
|| $form->dberror($query);

$ref->{qty}, $allocated, $ref->{unit} )
|| $form->dberror($query);
$sth->finish;
}

$sth->finish;

}

sub cogs {
Expand All @@ -1746,7 +1743,7 @@ sub cogs {
my $dbh = $form->{dbh};

# Parts info
my $part_sth = $dbh->prepare('SELECT * FROM parts WHERE id = ?');
my $part_sth = $dbh->prepare('SELECT * FROM parts__get_by_id(?)');
$part_sth->execute($id);
my ($part_ref) = $part_sth->fetchrow_hashref('NAME_lc');

Expand All @@ -1757,41 +1754,43 @@ sub cogs {
# Getting cogs
my $cogs_sth = $dbh->prepare('SELECT * FROM cogs__add_for_ar(?, ?)');
$cogs_sth->execute($id, $totalqty);
my ($cogs) = $cogs_sth->fetchrow_array();
my ($cogs_ref) = $cogs_sth->fetchrow_array();
my $cogs = pop @$cogs_ref;

push @{ $form->{acc_trans}{lineitems} },
{
chart_id => $parts_ref->{expense_accno_id},
chart_id => $part_ref->{expense_accno_id},
amount => $cogs * -1,
project_id => $project_id,
invoice_id => $inv_id
} if $cogs;

push @{ $form->{acc_trans}{lineitems} },
{
chart_id => $parts_ref->{inventory_accno_id},
chart_id => $part_ref->{inventory_accno_id},
amount => $cogs,
project_id => $project_id,
invoice_id => $inv_id
} if $cogs;

} else {
# Getting cogs
my $cogs_sth = $dbh->prepare('SELECT * FROM cogs__reverse_ar(?, ?)');
$cogs_sth->execute($id, $totalqty);
my ($cogs) = $cogs_sth->fetchrow_array();
my ($cogs_ref) = $cogs_sth->fetchrow_array();
my $cogs = pop @$cogs_ref;

push @{ $form->{acc_trans}{lineitems} },
{
chart_id => $parts_ref->{expense_accno_id},
amount => $linetotal,
amount => $cogs,
project_id => $project_id,
invoice_id => $inv_id
};

push @{ $form->{acc_trans}{lineitems} },
{
chart_id => $parts_ref->{inventory_accno_id},
amount => -$linetotal,
amount => -$cogs,
project_id => $project_id,
invoice_id => $inv_id
};
Expand Down
10 changes: 9 additions & 1 deletion LedgerSMB/Report/Aging.pm
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,15 @@ has 'date_ref' => (is => 'rw', coerce => 1, isa => 'LedgerSMB::Moose::Date');

=cut

has 'entity_class' => (is => 'rw', isa => 'Maybe[Int]');
has 'entity_class' => (is => 'ro', isa => 'Maybe[Int]');

=item entity_id

Customer/Vendor entity id

=cut

has entity_id => (is => 'ro', isa => 'Maybe[Int]');

=back

Expand Down
Loading