Re: [Ledger-smb-devel] LedgerSMB 1.4.27 released

2016-04-10 Thread John Locke
Docker image for 1.4.27 is available, as ledgersmb/ledgersmb:latest, 
1.4, and 1.4.27.



On 04/10/2016 05:00 AM, Erik Huelsmann wrote:
> The LedgerSMB development team is happy to announce yet another new
> version of its open source ERP and accounting application. This release
> contains the following fixes and improvements:
>
> * Added note to batch list that all are locked (Chris T)
> * Allow multiple logins per user, all with own locks (Chris T, #1418)
> * Fixes meaningless subtotals on recon search results (Chris T, #995)
> * SQL Ledger 3.0 migration support (Yves L/Erik H)
> * Fix random column ordering in PNL & B/S comparison (Yves L)
>
>   Special thanks to Stig Berg for finishing the Norwegian Bokmal translation
>
> Chris T is Chris Travers
> Yves L is Yves Lavoie
> Erik H is Erik Huelsmann
>
>
> The release can be downloaded from sourceforge at
>https://sourceforge.net/projects/ledger-smb/files/Releases/1.4.27/
>
> These are the sha256 checksums of the uploaded files:
> d12d846a4813785139b96c58f9d71dbd843c9743f1d9ac04bc1bec25be668a1b  
> ledgersmb-1.4.27.tar.gz
> 724ee1e6937bc340cbf390f52c8e5b7570060edad21c7a718184667f8f2e7e0d  
> ledgersmb-1.4.27.tar.gz.asc
>
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
> gampad/clk?id=1444514301=/ca-pub-7940484522588532
> ___
> Ledger-smb-devel mailing list
> Ledger-smb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301=/ca-pub-7940484522588532
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


[Ledger-smb-devel] LedgerSMB 1.4.27 released

2016-04-10 Thread Erik Huelsmann
The LedgerSMB development team is happy to announce yet another new
version of its open source ERP and accounting application. This release
contains the following fixes and improvements:

* Added note to batch list that all are locked (Chris T)
* Allow multiple logins per user, all with own locks (Chris T, #1418)
* Fixes meaningless subtotals on recon search results (Chris T, #995)
* SQL Ledger 3.0 migration support (Yves L/Erik H)
* Fix random column ordering in PNL & B/S comparison (Yves L)

 Special thanks to Stig Berg for finishing the Norwegian Bokmal translation

Chris T is Chris Travers
Yves L is Yves Lavoie
Erik H is Erik Huelsmann


The release can be downloaded from sourceforge at
  https://sourceforge.net/projects/ledger-smb/files/Releases/1.4.27/

These are the sha256 checksums of the uploaded files:
d12d846a4813785139b96c58f9d71dbd843c9743f1d9ac04bc1bec25be668a1b  
ledgersmb-1.4.27.tar.gz
724ee1e6937bc340cbf390f52c8e5b7570060edad21c7a718184667f8f2e7e0d  
ledgersmb-1.4.27.tar.gz.asc


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301=/ca-pub-7940484522588532
___
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


Re: [Ledger-smb-devel] Proposal, v1

2016-04-10 Thread Erik Huelsmann
The mail wasn't fully done when I hit "Send"...

On Sun, Apr 10, 2016 at 12:03 PM, Erik Huelsmann  wrote:

> Hi Yves,
>
> Looks like you found the right tree to bark at :-)
>
> There are a few comments in line below.
>
>
>> =
>> diff --git a/LedgerSMB/Report/Balance_Sheet.pm
>> b/LedgerSMB/Report/Balance_Sheet.pm
>> index d3af20e..b9aa94c
>> --- a/LedgerSMB/Report/Balance_Sheet.pm
>> +++ b/LedgerSMB/Report/Balance_Sheet.pm
>> @@ -42,6 +42,23 @@ Boolean, true if the regular hierarchies need to be
>> ignored,
>>
>>  has legacy_hierarchy => (is => 'rw', isa => 'Bool');
>>
>> +=item comparison_periods
>> +
>> +This is the number of periods to compare to
>> +
>> +=cut
>> +
>> +has comparison_periods => (is => 'ro', isa =>'Int',
>> +required =>1, default => 1);
>> +
>> +=item comparison_type
>> +
>> +This is either by number of periods or by dates
>> +
>> +=cut
>> +
>> +has comparison_type => (is => 'ro', isa =>'Str', required =>0);
>> +
>>  =item column_path_prefix
>>
>>
>> diff --git a/LedgerSMB/Report/PNL/Income_Statement.pm
>> b/LedgerSMB/Report/PNL/Income_Statement.pm
>> index ddba1d1..cd0d522
>> --- a/LedgerSMB/Report/PNL/Income_Statement.pm
>> +++ b/LedgerSMB/Report/PNL/Income_Statement.pm
>> @@ -31,6 +31,22 @@ This is either 'cash' or 'accrual'
>>
>>  has basis => (is => 'ro', isa =>'Str', required => 1);
>>
>> +=item comparison_periods
>> +
>> +This is the number of periods to compare to
>> +
>> +=cut
>> +
>> On Sun, Apr 10, 2016 at 2:18 AM, Yves Lavoie, GaYLi <
>> ylav...@yveslavoie.com> wrote:
>>
>>> Hi Erik,
>>>
>>> This ain't complete but the PNL works as expected, producing from 1 to 9
>>> years of comparison from a from_date and looking backward n years.
>>> I still have to work on dialog though.
>>>
>>> Yves
>>>
>>
>> +has comparison_periods => (is => 'ro', isa =>'Int', required =>0);
>> +
>> +=item comparison_type
>> +
>> +This is either by number of periods or by dates
>> +
>> +=cut
>> +
>> +has comparison_type => (is => 'ro', isa =>'Str', required =>1);
>> +
>>  =item ignore_yearend
>>
>
> You're duplicating the same fields here which makes me wonder if this
> should be part of a "Comparison" Moose role, or that it could/should be
> included in the LedgerSMB::Report::Dates role. What do you think?
>
>
>>
>>  This is 'none', 'all', or 'last'
>> diff --git a/LedgerSMB/Scripts/pnl.pm b/LedgerSMB/Scripts/pnl.pm
>> index 976fe75..3212dcc 100755
>> --- a/LedgerSMB/Scripts/pnl.pm
>> +++ b/LedgerSMB/Scripts/pnl.pm
>> @@ -32,6 +32,42 @@ use LedgerSMB::Report::PNL::Invoice;
>>  use LedgerSMB::Report;
>>  use LedgerSMB::App_State;
>>
>> +use LedgerSMB::PGDate;
>> +use Data::Dumper;
>>
>
> For now Data::Dumper is fine, of course, but please don't forget to remove
> before final commit.
>
>
>> +
>> +sub date_interval {
>> +my ($date,$interval,$n) = @_;
>> +$date = LedgerSMB::PGDate->from_input($date);
>> +$n //= 1;# Default to 1
>>
>
> Is this one comparison (i.e. 2 dates)? Or one date?
>
>
>> +if ($interval eq 'day'){
>> +   if ( $n > 0 ) {
>> +  $date->date->add(days => 1 * $n);
>> +   } else {
>> +  $date->date->subtract(days => 1 * -$n);
>> +   }
>>
>
> Reading the documentation on add() and subtract(), they are syntactic
> sugar for add_duration() and subtract_duration(). Reading the docs on
> subtract_duration(), it's simply a wrapper around add($duration->invert),
> which suggests to me that this code can be half as long by depending on
> "add(days => $n)" == "subtract(days => -$n)".
>
> In addition, I personally like to use hashes to do input mapping; in this
> case:
>
>my %delta_names = (
>  day => 'days',
>  month => 'months',
>  year => 'years',
> );
> my $delta_name = $delta_names{$interval};
>

   die "Bad interval: $interval" if undefined $delta_name;
   $date->date->add($delta_name => $n);


  sub generate_income_statement {
>>  my ($request) = @_;
>> @@ -44,18 +80,32 @@ sub generate_income_statement {
>>  } elsif ($request->{pnl_type} eq 'product'){
>>  $rpt = LedgerSMB::Report::PNL::Product->new(%$request);
>>  } else {
>> -$rpt =LedgerSMB::Report::PNL::Income_Statement->new(
>> +my $counts = $request->{comparison_periods} || 1;
>>
>
Does this one here mean that there's always going to be a comparison? (The
current report defaults to "no comparison"; I'm not sure we want to step
away from that?)


> +warn $counts;
>>
>


> +if ( $request->{comparison_type} eq 'by_periods' ) {
>> +# to_date = from_date + 1 period - 1 day
>> +my $date =
>>
>> date_interval(date_interval($request->{from_date},$request->{interval}),'day',-1);
>> +$request->{"to_date"} = $date->to_output;
>> +for my $c_per (1 .. $counts) {# Comparison are backward
>> +