When all was okay for rep301.php in v2.4.4, and now it is amiss, what lines changed in 2.4.7 to make it "correctly conforming to this new policy"?

FA 2.4.7 was released on 2019-06-25.
FA 2.4.4 was released on 2019-03-17.
rep301.php was last modified on 2019-06-24
Prior to 2.4.4, rep301.php was modified on 2017-12-09.

Hence a diff between then and now would prop up some leads. Ignoring all whitespace and comment changes, the effective diff is attached.

Related Post

State version of Apache/PHP/MySQL/Platform/FA.
Check apache and FA error logs.
Turn on debug if necessary in the config.php file.

978

(15 replies, posted in Reporting)

Using barcode reader to get the stock codes into FA does not require any integration in FA since a barcode reader is just a keystroke pump into the keyboard buffer.

The real need is to generate a new barcode report to accomodate your 13 digit barcodes.

The current translation for ar_EG is available at Transifex and is also attached here.

Your po file is for a boxygen theme codebase and has different formatting for certain strings.

The generated PHP file is for windows users who do not have a useable GD library due to different way that windows recognises locales. It is a fallback for those who cannot use the newer php GD library in FA. Some js related double escaped strings cause problems here.

Remove the Google sign-in for downloading the file.

The necessary ANSI files are at:
https://github.com/apmuthu/FA24extensions/tree/master/Languages/en_US

Also attached here.

983

(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.

984

(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.

985

(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.

989

(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;

990

(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.

992

(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.

993

(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)));

1,000

(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.