Hi Julien,
On 17/06/16 06:38, Julien Lamarche wrote:
There is certainly the capability to send emails from LedgerSMB,Hello, Is there a way to email account statements on a monthly basis to the account holder?
I've just had a quick look, and I don't think 1.4 can directly email a statement unfortunately.
You can however use AR=>Search to select a specific customer and enable display of Subtotals (checkbox)
This provides a list of invoices and amounts.
You can then generate a PDF from this (link at the bottom of the list) and email it manually.
Once we release version 1.5 it should be possible to email a statement directly from either this screen or a separate report under
AR=>Reports
No Need to fork, this is something I believe should be part of the core project, and I will make sure it's available for V1.5I browsed & searched in the manual & FAQ. I couldn't find a mention of such a feature. Happy to fork the project and attempt to implement the feature if it isn't.
In theory it's possible to use curl to authenticate and access the results of a search, then generate the required PDF.Alternatively, if there's a way to authenticate from the command line (lynx, curl), I suppose I could use wkhtmltopdf and bash .
No wkhtmltopdf needed.
Something like this should work.
#!/bin/bash
CustomerName="${1:-abba}";
UserName='autoReportingUser';
CompanyName='YourCompany';
URL="">
http://ledgersmb.local:8080
';
#Format='CSV';
Format='';
#Format='PDF';
Extn=${Format:-html};
Extn=${Extn,,};
OPT='action=""> OPT+='entity_class=2&'
OPT+='account_id=&'
OPT+='entity_name=$CustomerName&"
OPT+='meta_number=&'
OPT+='person_id=&'
OPT+='bc_count=&'
OPT+='taxable=&'
OPT+='tax_account_id=&'
OPT+='invnumber=&'
OPT+='ordnumber=&'
OPT+='ponumber=&'
OPT+='partnumber=&'
OPT+='source=&'
OPT+='description=&'
OPT+='notes=&'
OPT+='ship_via=&'
OPT+='from_date=&'
OPT+='to_date=&'
OPT+='from_month=&'
OPT+='from_year=&'
OPT+='interval=none&'
OPT+='_on_hold_=on&'
OPT+='open=1&'
OPT+='col_invnumber=1&'
OPT+='col_transdate=1&'
OPT+='col_entity_name=1&'
OPT+='col_netamount=1&'
OPT+='col_amount=1&'
OPT+='col_last_payment=1&'
OPT+='col_paid=1&'
OPT+='col_duedate=1&'
OPT+='col_due=1&'
OPT+='subtotal=1&'
OPT+='col_running_number=&'
OPT+='col_id=&'
OPT+='col_ordnumber=&'
OPT+='col_ponumber=&'
OPT+='col_business_units=&'
OPT+='col_salesperson=&'
OPT+='col_manager=&'
OPT+='col_tax=&'
OPT+='col_curr=&'
OPT+='col_notes=&'
OPT+='col_till=&'
OPT+='col_shipping_point=&'
OPT+='col_ship_via=&'
OPT+="company=$CompanyName"
echo -n >
"/tmp/$CustomerName.$Extn" # truncate the output file so we don't end up with stale results
curl --silent --user $UserName -o "/tmp/$CustomerName.html" "$URL/invoice.pl?$OPT"
Save it as eg: GetStatement.sh
Run it as
where Foo is the customer nameGetStatement.sh Foo
The result will be placed in
- Format='' "/tmp/$CustomerName.html"
- Format='PDF' "/tmp/$CustomerName.pdf"
- Format='CSV' "/tmp/$CustomerName.csv"
Changing which "Format=" line is used will switch between HTML, PDF, CSV output formats
We are a worker's cooperative in Gatineau, Quebec using the software to track membership payments. I have not used the software directly myself yet as I don't manage the accounts. Thank you & have a good weekend, Julien Lamarche
Regards
David G
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape
_______________________________________________ Ledger-smb-users mailing list ..hidden.. https://lists.sourceforge.net/lists/listinfo/ledger-smb-users