How is ‘path_to_root’ set? Or how to reset the working directory?


I am writing a small extension to add some additional fields to customers.


So sales/manage/customers.php
Is now modules/additional_fields/manage/ customers.php


File:  /additional_fields/manage/customers.php

Line 13: $path_to_root = "../..";
Is changed to:-
Line 13: $path_to_root = "../../..";

The necessary code is added for the additional fields which work as expected.


However, clicking on the Transactions tab the following error (and 4 others similar appear):-

include_once(../../includes/db_pager.inc): failed to open stream: No such file or directory in file: /sales/inquiry/customer_inquiry.php at line 14
/sales/inquiry/customer_inquiry.php:14: include_once()
modules/additional_fields/manage/add_customers.php:449: include_once(' /sales/inquiry/customer_inquiry.php')

And

include_once(): Failed opening '../../includes/db_pager.inc' for inclusion (include_path='.;C:\php\pear') in file: sales\inquiry\customer_inquiry.php at line 14
sales\inquiry\customer_inquiry.php:14:     include_once()
modules\additional_fields\manage\add_customers.php:450:     include_once('sales\inquiry\customer_inquiry.php')

(Similar errors appear on the Sales Orders tab)

If the path_to_root in customer_inquiry.php is changed to ../../.. then it works, but obviously now I cannot access Sales -> Customer Transaction Inquiry as numerous fatal errors appear.


How do I reset the working directory?

352

(6 replies, posted in Setup)

Thats the one!

I've added it here https://frontaccounting.com/fawiki/inde … in.General

353

(6 replies, posted in Setup)

@Apmuthu - I'm sure I've seen a wiki page (poss a forum topic) on setup with account balances etc? I cannot find it.

354

(6 replies, posted in Setup)

For initial balances, its better to do journal entries - Banking and General Ledger -> Journal Entry
Then choose the general ledger account you have assigned to that bank account.

You can have as many bank accounts as you need - cash, petty cash, deposit, etc
A GL account needs to be assigned to each bank account, you may need to create the necessary GL accounts

I like this too
Notes:-

  1. Editable desc is stored in sales_order_details & debtor_trans_details which are both tinytext so 255 char max

  2. @apmuthu it should only affect combo_input fields which are editable.

  3. When selecting an editable desc item in purchases the textarea is only visible after selecting quantity or price - Is anyone else getting this?

356

(4 replies, posted in Setup)

If you're new to FA I suggest you use one of the existing official FA themes

I'm sure there is another post here which is very similar to yours, but I cannot find it!

@apmuthu maybe on later/tomorrow he will know more than me

Any clues in error logs?

Your PHP Version     5.4.45 poss a little low..

It also states:-
ERR_UNSAFE_REDIRECT

Have a look at this post

What does phpinfo state?

I have no experience of IIS, but there are a few posts on the forum:-

Topic - go here 1st
Topic
Last Post in this topic
In the wiki

The Bank GL Inquiry - with memo can stand on it's own as an extension and then as apmuthu states replace the existing Bank Account Inquiry as and when
The Customer Statement Report - enhanced & Sales Type Summary Report are suitable for extensions.

The Sales Map & Picklist for deliveries require further work before they are 'stand-alone' extensions; the picklist needs to be included in the sale map as if your business requires one of these it will probably require the other one as well.

361

(10 replies, posted in Setup)

Please read my previous post more carefully

poncho wrote:

now you may or may  not be able to edit the prefix (in this case the prefix is 'PB') depending if you have entered transactions using this reference or not;

So to reiterate:-
If you have created documents/transactions using that prefix you will not be able to edit it
If you have not created any documents/transaction using that prefix you will be able to edit it

362

(8 replies, posted in FA Modifications)

My js is non-existent, I had a quick look at datepicker / time picker libraries (there's lots)... its not a simple mod.

What exactly do you want to achieve?

363

(8 replies, posted in FA Modifications)

I would start here:-

File: \includes\ui\ui_view.inc

969: function get_js_date_picker()

And
File: \includes\ui\ui_view.inc

1247:   function calendarDrawTable() {

364

(8 replies, posted in FA Modifications)

I may have led you astray a little - sorry

Something like -

datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Should give the time when you select the date from the datepicker


But do you want to input the time manually? I believe you will still need datetime but also changes to core

Other than less info whats the difference between report 304 and Sales Type Summary Report?

There was also:-

set_browser_title("bank_account");

On line 193 which needs to be commented out

367

(8 replies, posted in FA Modifications)

What happens if you change the data type from 'date' to 'datetime' or 'timestamp'? MySQL
Not sure how FA will read stored value though???

Bank GL Inquiry - with memo now giving the following error:-

Call to undefined function scroll_down() in \modules\bank_gl_inquiry\bank_gl_inquiry.php on line 192

369

(13 replies, posted in Translations)

Just to clarify, your image link does not actually show that Italian is the default language.

I had a problem with:-
Bank GL Inquiry - with memo giving following error:-
Call to undefined function payment_person_name_link() in \modules\bank_gl_inquiry\bank_gl_inquiry.php on line 139
And
Picklist for deliveries keeps stating:-
No sales orders found#
(Sorry didn't have time to investigate further)

I like the Sales Type Summary Report - Should be included in core

Not so sure of the value of Customer Statement Report - @braathwaate comment welcome please

I need to do a clean install for the Sales Map, will have time later in week.

371

(13 replies, posted in Translations)

Is Italian your default lang?

You can also change the field labels using a 'translation' if you want?

Thank you braathwaate, will try out this week

374

(3 replies, posted in Misc. Charts of Accounts)

No there does not seem to be.

Option 1. Modify an existing countries COA
Option 2. Create an Itialian COA from scratch.

@Apmuthu may be around later/tomorrow he may know of one

375

(13 replies, posted in Translations)

Go to Setup -> Install/Update Languages and Italian is an option