951

(13 replies, posted in Report Bugs here)

Browser based cache is different from session cache dished out from the server and used in the intermediary processing scripts thereat. Cookies may store such session cache if poorly designed. Having totally server side processing only without transmission of session variable values and avoiding any hidden fields may be the way forward though it may warrant multiple page navigations to and forth.

952

(6 replies, posted in Accounts Receivable)

Create an unused "Retail Cost" Sales Type and do not use it for invoicing. Instead, create a "Sales" Sales Type and mark it up as a "cost-plus" selling price and use it for sales invoicing.

953

(6 replies, posted in Accounts Receivable)

Will the Retail / Wholesale not do?

If you are using Linux Server, then you must install the language in the OS also.

We use:

dpkg-reconfigure --frontend=noninteractive locales
update-locale en_US ISO-8859-1 en_US.UTF-8 UTF-8 ta_IN hi_IN ar_EG.UTF-8

Add your language as appropriate.

Latest zip attached.

@braathwaate: Good one indeed.

Make sure the /tmp folder exists and is writeable.

The $$ is the PID (Process ID) of the shell which is expected to be random for that session.

Wiki-ed it.

Bash Scripting Cheatsheet

1. create a script to use the API as in the wiki.
2. Add in code to specify the shebang line at the top for CLI execution and set the php.ini settings for FA in it.
3. now execute it manually to see if the recurring invoices script works.

Otherwise, just take a backup of the FA SQL and execute a manual recurring invoice and compare with the later backup of FA sql and see what changed and write a simple bash / php script to get it done and put it into the crontab of any linux server or on windows use VisualCRON or Task Scheduler.

957

(2 replies, posted in Reporting)

You will either need to use a user defined Pivot function / procedure or make a php function to assemble a sql like it and then create a FA report to display it.

You want Item Category, User Sum for each user across the page.

A nice report indeed - An Item category Wise Customer Sales listing. Start by modifying Item Sales Summary Report - rep309.php.

Specify if you want Qty, Inv Amount or both to be summed.

Raw SQL (ST_SALESINVOICE=10 as defined in includes/types.inc):

SELECT dd.stock_id
     , dd.description
     , dt.debtor_no
     , dm.`name` AS debtor
     , SUM(dd.quantity) AS TotQty
     , SUM(dd.quantity * dd.unit_price) AS TotAmount
FROM 1_debtor_trans_details dd LEFT JOIN 1_debtor_trans dt
     ON (dd.debtor_trans_no = dt.trans_no AND dd.debtor_trans_type = dt.`type`)
   LEFT JOIN 1_debtors_master dm USING (debtor_no)
WHERE dd.debtor_trans_type=10
GROUP BY dd.stock_id, dt.debtor_no;

Sample output (debtor name omitted for space, date filters can be incorporated in the WHERE clause, adjust table prefix as appropriate):

stock_id    description    debtor_no    TotQty    TotAmount
101         iPad Air 2 16GB     1          21    6300
102         iPhone 6 64GB       1           5    1250
102         iPhone 6 64GB       2           1    222.62
103         iPhone Cover Case   2           1    44.52
202         Maintenance         1           5    0
26138763    Bucket              1           3    18
301         Support             1           3    240
95006000    Billiard Balls      1           5    54

The real PIVOT sample SQL for the training company will be:

SELECT IFNULL(stock_id, 'Totals') AS stock_id
     , description
     , IF(debtor_no=1, TotQty, 0) AS `Qty - Donald Easter LLC`
     , IF(debtor_no=1, TotAmount, 0) AS `Amt - Donald Easter LLC`
     , IF(debtor_no=2, TotQty, 0) AS `Qty - MoneyMaker Ltd.`
     , IF(debtor_no=2, TotAmount, 0) AS `Amt - MoneyMaker Ltd.`
FROM ( 
SELECT dd.stock_id
     , dd.description
     , dt.debtor_no
     , dm.`name` AS debtor
     , SUM(dd.quantity) AS TotQty
     , ROUND(SUM(dd.quantity * dd.unit_price),0) AS TotAmount
FROM 1_debtor_trans_details dd LEFT JOIN 1_debtor_trans dt
     ON (dd.debtor_trans_no = dt.trans_no AND dd.debtor_trans_type = dt.`type`)
   LEFT JOIN 1_debtors_master dm USING (debtor_no)
WHERE dd.debtor_trans_type=10
--  AND dt.trans_date between '2018-05-10' and '2019-01-21'
GROUP BY dd.stock_id, dt.debtor_no
) a GROUP BY stock_id
WITH ROLLUP;

958

(15 replies, posted in Reporting)

If you do not want to display the error then just comment out the entire if construct. If you do it the way you stated, then the error string will print for valid barcodes only!

@boxygen: Thanks.
Done and updated the zips as well.

This change occurred when it was ported to FA 2.4 when all capitals and hyphen came into effect. In FA 2.3 it the way it was with lower and upper case and underscore as well.

For those using FA 2.3, make sure it is the way it was earlier.

960

(2 replies, posted in FA Modifications)

The problem will come when the db user does not have rights to create / alter views during restoration. Submit your code hack for the devs to see how to incorporate them. This could be useful for all lookup tables bundled into one with filtered views.

961

(15 replies, posted in Reporting)

What are you trying to do? Just suppress all barcode errors or have it display errors when there is no error?

UGX is available in ExchangeRates.org (1) whilst Indian Rupee is available in it as well as in ECB (0).

Check line endings (Windows or Linux) of the csv file - CRLF or just LF.
Turn on debug in the config file and also turn on error reporting in php.ini and see what appears in the logs.

Updated FA24extensions with these changes in FrontHRM module.

@joe: is this okay to add into the core?

The files are put in appropriate folders in the attachment.
@joe: want to add it into the FA 2.4.x core itself as it only uses the phone and phone2 fields of the crm_contacts table with no other changes?

The sys_prefs table record for gl_closing_date is set in the function close_transactions() in the file includes/db/audit_train_db.inc.

update_company_prefs(array('gl_closing_date'=> date2sql($todate)));

968

(7 replies, posted in Announcements)

Anyone who wants to follow FA 2.5 can use the unstable branch to fork and work on. We already have a PHP 7 branch that is stuck at 2017-11-06.

Wonder if the constants are case sensitive and can contain numbers - SS_CLEARINGINVOICEv2

FA cleverly manages to get new sequential values if existing ones are occupied (105).

105 * 256 (shift left 8) = 38400.

Obviously you have tried to install, remove and re-install the module several times.

Try it on a fresh FA install with no other module and see what comes of it.

@joe: must this fix be incorporated in the stable version atleast now?

Version 2 should be a new module (with it's own distinct name) in your case as you want to have both versions concurrently with only a subset using the new version. A separate script in your new version module must independently migrate the security settings as needed or have it set anew in it.

972

(6 replies, posted in Accounts Receivable)

When adhoc amounts are paid into the credit of a customer, then it should be allocated to the appropriate invoice desired. This should be done as Customer Payments instead of just as Journal / Bank entries.

Investigate at point of display if the user decimals kicks in.

974

(5 replies, posted in Reporting)

FA 2.5 is the unstable branch of the SF / GitHub repos:
https://github.com/FrontAccountingERP/FA/commits/unstable
Blue Line in https://sourceforge.net/p/frontaccounting/git/commit_browser
My Unofficial Repo: https://github.com/apmuthu/frontac25

PHP Version?
Some have rounding errors.
Increase precision to 17 from default 14 in php.ini.