76

(15 replies, posted in Reporting)

Glad you got it sorted, not sure if this is bug or as designed; it does seem a little incomplete that rtl just defaults all Textwrap alignments to right align though, I'll add it to mantis

77

(15 replies, posted in Reporting)

@rafat, your not touching tcpdf core, your editing \reporting\includes\class.pdf.inc

78

(15 replies, posted in Reporting)

1. Are you sure you only have one copy of header2.php(Check in the company folder)



2. Tracing the Textwrap function back to getCellCode:-

File: \reporting\includes\tcpdf.php

2993:                 if ($align == 'L') {
2994:                     if ($this->rtl) {
2995:                         $dx = $w - $width - $this->cMargin;
2996:                     } else {
2997:                         $dx = $this->cMargin;
2998:                     }
2999:                 } elseif ($align == 'R') {
3000:                     if ($this->rtl) {
3001:                         $dx = $this->cMargin;
3002:                     } else {
3003:                         $dx = $w - $width - $this->cMargin;
3004:                     }
3005:                 } elseif ($align == 'C') {
3006:                     $dx = ($w - $width) / 2;
3007:                 } elseif ($align == 'J') {
3008:                     if ($this->rtl) {
3009:                         $dx = $w - $width - $this->cMargin;
3010:                     } else {
3011:                         $dx = $this->cMargin;
3012:                     }

Option 'C' does not have a if ($this->rtl) statement so 'C' should have no difference in RTL or LTR

So 2a. Logout, Delete all cache in company folder, delete browser cache(Pref change browser) log back in.

2.b In function Textwrap  a function addTextWrap is called, part of function below:-

File: \reporting\includes\class.pdf.inc

294:     function addTextWrap($xb, $yb, $w, $h, $txt, $align='left', $border=0, $fill=0, $link = NULL, $stretch = 1, $spacebreak=false)
295:     {
296:         $ret = "";
297:         if (!$this->rtl)
298:         {
299:             if ($align == 'right')
300:                 $align = 'R';
301:             elseif ($align == 'left')
302:                 $align = 'L';
303:             elseif ($align == 'center')
304:                 $align = 'C';
305:             elseif ($align == 'justify')
306:                 $align = 'J';
307:         }
308:         else
309:             $align = 'R';

this seems to be expecting the $align variable to be either 'right', 'left', 'justify', 'center'; not R, L, J, or C.

So in header2.php try this:-

$this->TextWrap($col, $this->row, $width, $info_header, 'center');

Delete cache etc

Post back results please

Edit it also states that if rtl everything will be R so try changing the else part to this:-

297:         if (!$this->rtl)
298:         {
299:             if ($align == 'right')
300:                 $align = 'R';
301:             elseif ($align == 'left')
302:                 $align = 'L';
303:             elseif ($align == 'center')
304:                 $align = 'C';
305:             elseif ($align == 'justify')
306:                 $align = 'J';
307:         }
308:         else
            {
                 if ($align == 'right')
                     $align = 'R';// This may need to be 'L'
                 elseif ($align == 'left')
                     $align = 'R';
                 elseif ($align == 'center')
                     $align = 'C';
                 elseif ($align == 'justify')
                     $align = 'J';
             }

You may need to change
if ($align == 'right')
    $align = 'R';
to
if ($align == 'right')
    $align = 'L';

Note you will need to use:-

$this->TextWrap($col, $this->row, $width, $info_header, 'center');

in header2.php for this to work

Also this will affect all ten of the print documents please check all of them: Please pay special attention to Report 108 (Print statements) As Textwrap is called an additional two times.

79

(15 replies, posted in Reporting)

@Rafat, Look at a LTR report in the mirror, take a pic; then compare it with your RTL report, highlight differences and post both pics



Note that the FA version of TCPDF is quite dated, there may well be RTL bugs in previous versions. Maybe try the latest version - TCPDF github tcpdf.php, but this may give you more problems than are resolved. But if it does fix the problem at least you know there is a fix - then compare old and new versions. Remember to rename the original tcpdf.php version.

80

(15 replies, posted in Reporting)

Documents in LTR are not centered, the Company name, email etc is aligned left, it is a mirror image of  the pdf you have attached.

There does not seem to be one

Looks like you may have to write your own, @apmuthu has written a ERD for manufacturing and other's here, it may be outdated as was written for V2.3, but it's a starting point.

Glad you got it sorted.

Do you really have 2000+ accounts in your COA? Do you really actually use all the 2000+ accounts? Most companies wouldn't need more than 200...ish

I've worked in several large organizations where the system in post #6 was used very successfully for years. Now days they are using systems like SAP; if you can afford SAP then your company is doing very well! FA on the other hand is a lot cheaper

Manufacture's and large organizations use 'Management accounting' along side their regular accounts to help manage and control operations.

Have a google for 'Management accounting in manufacturing'.

What may help you:-
Set up the BOM to reflect the average wastage over say 10 runs - lets say 5% - This is called the 'Standard wastage'. You can fine tune this later as you get more data.

In your management accounts you record the wastage from each production run as a 'variance':-
(each batch is say 100kg)
Week 1 production
Batch 1: 7Kg (+2)
Batch 2: 8kg (+3)
Batch 3: 4kg (-1)
Batch 4: 2kg (-3)

Total Weeks wastage 21kg against a standard wastage of 20kg(4 x 100 x 5%)

Now your accounts already show the 20kg of standard wastage, all you need to do is make an inventory adjustment +/-. (If negative this write off needs to be reflected in your selling price)

You can do this over what time period you want, weekly is normal for collecting the data, and the write off normally occurs on a monthly basis; but whatever works for your business is fine.

In a manufacturing environment have weekly/monthly stock counts of all components and you would hold weekly investigations for any variances outside norm. This helps keep wastage low. (You may initially think that the important batch's to investigate are 1 & 2 above where the actual wastage is above standard wastage; but by investigating batch 4 above you have an opportunity to reduce all batch's to -3kg by copying what happened during that production run)

Production employees can record actual wastage on a form or in a smaller manufacturing environment the actual works order which would then be returned.

I know of no way to use FA for management accounting, a simple spreadsheet should suffice.

@imtiazchuttoo I have edited my reply in post #2

@apmuthu & @joe can you have a look at this please?

The accounts do not need to show that this 8kg was ever used in the 1st place

BOM is set so that 1 kg finished product use up 1.02 kg raw material

input   : raw material used = 102 kg
output : finished product = 100 kg + 2 kg of material X ( usually lost )

I'm confused when you write "This is easily be done in FA by adding a "new supplier" and"... why add a new supplier?

Are you using Purchasing->Supplier Purchasing Data?

I've just tested this:-

Supplier names item as 'beer', we name it water
Add item water
go to Purchasing->Supplier Purchasing Data?
select item water
select the supplier
optional add a price
in this case ignore suppliers UOM - leave blank
Leave Conversion Factor (to our UOM): 1 (this is a 1:1 ratio - yes?)
Supplier's Code or Description: beer

Click 'Add new' button at the bottom, this info is now saved in the DB, (to edit it, select item water and you will see a table with existing Supplier purchase date - click the edit icon)

Now purchase item from said supplier item will appear as water until Purchase order is printed; then it states beer.

In inventory it states that I have water in order

Then edited PO price and quantity, printed and it still states beer.

So it seems to work? hmmmm...

Logged out and in; PO print still states beer
Receive goods: Description is listed as water, receive goods; now print PO states water; In Supplier Purchasing Data the description has now also been changed to water.

Is this the intended functionality?
Do you have to change the grn to the supplier description(beer) to keep Supplier Purchasing data as beer? (@imtiazchuttoo this looks like the current work around)
This doesn't really make sense and is not intuitive

I also believe that the Supplier Purchasing data, should not be changed unless it is by user.

Possibly the grn should read the Supplier Purchasing data description(beer) not the item description(water).

Possibly a bug. I have entered it in mantis

That's strange? Can you post a screenshot? And I'll try to make the necessary changes, will not be able to test though.

Edit I have increased height & width of the button: @apmuthu I have no access to XP, can you please check, post screenshot if not ok.

Hi apmuthu,
Thank you for the feed back:-

In chrome & firefox top menu item - Allocate Supplier Payments or Credit Notes shows ok, screenshot below - what browser are you using please?

In vertical the menu - position: fixed; the idea was that menu would stay in same spot for longer pages. I can make it position: absolute; so user can scroll.
Its really going to depend on user screen size - so have to accommodate all users so will make the change.
In the future these will be icons, smaller so more of them, but will still depend on number selected and user screen size - maybe allow for two - three columns of icons?

So this is different – two versions: (One with horizontal quicklinks and the other with vertical quicklinks) Both still in development.

Both themes feature:-

  • Quicklinks are user defined; click on the ‘six dots’ icon(or double kebab, double menu, menu menu…) Select the user mode you want to change and select/deselect the applications you want in this user mode, save. (Page refresh if you want to see the changes made.)

  • User modes are user defined; hover over the ‘people’ icon and you will see a list of user defined user modes, select the one you want and you will see the quicklinks change instantly.

  • Other applications are presented by module type: Not by main application(Sales, Purchasing, etc.)
    •    So the ‘plus’ icon lists all the other 0 Transactions apps not listed in current usermode quicklinks.
    •    The ‘page’ icon lists all the other 1 Inquiries & Reports apps not listed in current usermode quicklinks.
    •    The ‘spanner’ icon lists all the other 2 +3 Maintenance apps not listed in current usermode quicklinks.
    •    The ‘kebab’ icon lists setup apps in traditional format.

Note: Access roles still apply! I’ve also predefined some usermodes.


Why? Most current themes give the same prominence to all apps, So ‘Direct Invoice’ has the same ‘status’ as say ‘Sales Groups’; the first one you may use ten times a day the other you may use once a year or if at all.
So you need to define the apps you use regularly; whilst still having access to all the other apps in the background for as and when required – which is what I have tried to achieve.


Uses:

  • I remember that when I first used FA I was little ‘intimidated’ by the sheer number of options available – 133 apps - which one? So may help new users.

  • A small business owner wears many hats, mostly it’s their ‘Sales’ hat, but sometimes they need to wear their ‘Purchasing’ or ‘Accounts’ hats.

  • Any user who wants to improve and speed up their workflow.


Notes:

  1. As mentioned still very much in development – advice, reviews, comments, etc, very welcome.

  2. Hot keys do not work

  3. I would like to change the vertical theme quicklinks to icons with hover over tooltips –ongoing.

  4. As currently written, this theme would require an extension as well as the actual theme – how the Dashboard was in FA V2.3

  5. Currently using the DB, writing to a file would probably be a better way.

Demo here
username: demo
Password: password

91

(4 replies, posted in FA Modifications)

Change the tax rates and tax names to suit the example given by @rafat

wiki changed to Pakistan example wrote:

Using Tax on already added Tax (Pakistan)
Certain regions in Pakistan have a Provisional Tax of 19.5% and a Advance Income Tax of 12.5% on already taxed items. Here is how you can handle that.

First create 2 Tax Types:
Provisional Tax 19.5%, rate 19.5 Remember to include the 19.5% in the name.
Advance Income Tax 12.5%, rate 14.9375(12.5 * 1.195). Remember to include the 12.5% in the name. You will need to increase the percent decimals in preferences. The value 1.195 is the value of Provisional Tax + 1. If the Provisional Tax was 6% this value would be 1.06.
Combine these two Tax Types into a Tax Group.
Find the variable, $suppress_tax_rates, in config.php about line 193. Change the value to 1. This will suppress the internal tax rate when printing.
That's it.

The last sentence is no longer valid in current FA version; you now suppress tax rates in Setup->Company setup-> Suppress Tax Rates on Docs: checkbox

Read the wiki on tax groups.

Try it out on your training company first

Re-reading you may just want this:-
There is no css class defined just for this, so you need to add one:-

.repclass tbody tr td a {
    font-size: 12px;
}

Note:- .repclass a {... should work, but not tested

That will do only the Reports For Class: list, to change the report classes: list read the following:-

How do you see what css affects what element on a page?
Either press the F12 key OR right-click on page element and select 'Inspect'(Chrome) or 'Inspect Element'(Firefox) You should now see a panel showing html and another panel showing the relevant css.

Have a play

Tips -
You can change what you want and instantly see the results(They are not saved, to cancel changes just press page refresh), then make the changes in the css file.
In Firefox only (sadly not chrome) if you right-click over an html element(in html panel) select 'Copy' then 'CSS Path'; paste that into a text editor and you will see the complete css path, shorten as necessary, then use.

Google 'how to use browser developer tools' for more info

93

(4 replies, posted in Translations)

Run phpinfo is gettext extension enabled?
Compare phpinfo with both servers

Not too many posts using FA on NGINX here, maybe someone has similar experience, but its probably more worthwhile to search 'gettext not working NGINX'on google, gives plenty of results.

Search for 'Shipping cost purchase order' in this forum, there are 2 or 3 relevant topics. Post again if you still have questions.

95

(2 replies, posted in Accounts Receivable)

Is this topic similar and of help? You can use the same method for stock items as well.

If not can you explain 'allocate a purchase line to a customer' please; also you mention 'reimbursable', but what is reimbursable? Perhaps explain what you want to do in a different way?

96

(4 replies, posted in Setup)

@paul You know you can press the help icon in any page and it will take you to the relevant wiki page?

My js is yuk!...but my understanding of that SO post is $(document).ready() is already called somewhere else so you need something else to initialize it????????????????????????????????????????

The 'top' answer seems like  the one you want, it's in the comments...read 1 - 3 for that solution they had to replace the $(document).ready() to $(document).on... or something else in the third comment.

Hope that hasn't confused you more and you get it working

Now I understand what you are looking for - if you are not totally committed to using js then:-

css only answer here on stackoverflow and here using position: sticky;
Can I use lists all major browsers except as usual IE.

You may have to add auto scroll or similar to the table as well

Lots of answers on SO and other sites with googling "freeze table header and columns css site:stackoverflow.com"

For 1st five of anything use something like :nth-child(-n+5)

No js = no js conflicts

There are also a few minimal js solutions too using the same search as above

@apmuthu, @ joe

Based on:- This has been a problem for quite a while

You could assume that:-
Not many users have item desc >50 for purchasing. Those that do have not reported the issue, therefore there is a high likelihood that the purchase order is for internal use only.
So continuing to truncate the supplier_description in the purch_data table would still allow STRICT_ALL_TABLES to be used and most users would see no difference anyway. AND this is no different to what has been happening up to V2.4.6 so far.

So:-

File: \inventory\includes\db\items_purchases_db.inc
21:         .db_escape($supplier_description) . ")";

And

File: \inventory\includes\db\items_purchases_db.inc
32:         supplier_description=" . db_escape($supplier_description) . "

Could be changed to something like (Not tested):-

File: \inventory\includes\db\items_purchases_db.inc
21:         .db_escape(substr($supplier_description, 0, 50)) . ")";

And

File: \inventory\includes\db\items_purchases_db.inc
32:         supplier_description=" . db_escape(substr($supplier_description, 0, 50)) . "

Also two changes to function add_or_update_purchase_data in File: \purchasing\includes\purchasing_db.inc Lines 103 & 112

As stated code not tested, so please check.
It's certainly not the correct solution, but does delay db changes to V2.5

I think it's this:- It's your GL Account Classes:-
What are the names of your GL Account Classes? Go to Banking And General Ledger->GL Account Classes: Change names of Income and Cost classes...may as well change the rest why you are there.