1,426

(7 replies, posted in Setup)

Will FA data need to get populated into VirtueMart or vice-versa? Create views of the write DB's table in the read-only DB's table.

The function get_invoice_range() in the invoice report reporting/rep107.php uses the sql:

SELECT trans.trans_no, trans.reference
FROM 1_debtor_trans trans 
LEFT JOIN 1_voided voided ON trans.type=voided.type AND trans.trans_no=voided.id
WHERE trans.type=10 AND ISNULL(voided.id);

which extracts the invoices to be printed and example of it is:

trans_no    reference
1    001/2017
2    002/2017
3    003/2017
4    004/2017

The function get_customer_trans in sales/includes/db/cust_trans_db.inc uses the sql:

SELECT trans.*, ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total,
    cust.name AS DebtorName, cust.address, 
    cust.curr_code, 
    cust.tax_id,
    trans.prep_amount>0 AS prepaid,
    com.memo_, 
    1_shippers.shipper_name, 
    1_sales_types.sales_type, 
    1_sales_types.tax_included, 
    branch.*, 
    cust.discount, 
    1_tax_groups.name AS tax_group_name, 
    1_tax_groups.id AS tax_group_id 
FROM 1_debtor_trans trans
    LEFT JOIN 1_comments com ON trans.type=com.type AND trans.trans_no=com.id
    LEFT JOIN 1_shippers ON 1_shippers.shipper_id=trans.ship_via, 
    1_debtors_master cust, 
    1_sales_types, 
    1_cust_branch branch, 
    1_tax_groups 
WHERE trans.debtor_no=cust.debtor_no
  AND 1_sales_types.id = trans.tpe
  AND branch.branch_code = trans.branch_code
  AND branch.tax_group_id = 1_tax_groups.id;

The delivery date is in another record (type=13) and not in the invoice record (type=10).

1,428

(4 replies, posted in Setup)

Take a data dump of your FA database from phpMyAdmin directly if you are not able to benefit from the instructions in my previous post.

1,429

(3 replies, posted in Fixed Assets)

Ensure that the fixed asset you wish to delete does not have any transactions in FA first.

1,430

(17 replies, posted in Reporting)

If this info is for all customers - add signature in the file reporting/includes/header2.inc

This will apply for all reports that use the header2.inc file if the "if" statement is removed in the succeeding bulleted point.

Make an extension to implement this ether with a sys_prefs flag to toggle the functionality or have an option in the report request form as a parameter. ST_CUSTDELIVERY (13) in gl_trans table has the trans_date as the delivery date.

1,432

(82 replies, posted in FA Modifications)

JQuery can be an extension by itself. Other extensions can then depend on this or install it as a pre-requisite where absent with an alert.

An extension with a separate table should be designed and a page showing undelivered items and their client/order details should be presented to select from to make a delivery schedule. The order will be qualified with a delivery schedule ID to make it a primary key in it. On delivery, separate delivery orders would get created from this combination uniquely.

Short of this, make a separate delivery application and then import into FA by studying the DB Anatomy of a Delivery Order in FA.

1,434

(17 replies, posted in Reporting)

Refer the Wiki under the Report Signature para.

FA has plugin extensions capability. All extensions are loaded in from the Default Company and can be activated for any or all of the companies in that FA instance.

A list of extensions are in my repo. All official extensions are available for installation from within the default Company login in FA in the Setup tab.

In your case, you will need to make an extension for your workflow or have someone make it for you by posting a bounty in the Job Offers board.

Search the Wiki and the Forum before posting though.

This is more of a logistics requirement for delivery bunching.
An extension is in order.

1,437

(26 replies, posted in Reporting)

Yes, they are part of the Advanced PHP debugger.

1,438

(29 replies, posted in Installation)

The file you listed is in the webroot. There is no use in making 'active => true'. There is another installed_extensions.php in each company/# folder in which the active modules will have 'active' => 1,.

1,439

(26 replies, posted in Reporting)

@joe: Line 186 in admin/db/maintenance_db.inc can be preceded with:

if (!(is_array($db_connections)) $db_connections = array($db_connections);

1,440

(17 replies, posted in Modules Add-on's)

Contact host provider to allow php.ini overrides in scripts.

Can actually revert the whole commit and introduce the indices stated in my commit and commented in the original commit..

1,442

(17 replies, posted in Modules Add-on's)

Now this is a question of your "session / php.ini / file permission" settings on your linux server that prevents overriding ini parameter values inside the php code.

The issue here is that the alias of the table in addressing the field may be required in some MySQL versions. Therefore the field "account" referred to in the existing sql was sought by you to be replaced by "trans.account" which is okay. The NULL check is still retained.

Since the gl_trans is declared with an alias trans it might be necessary for some MySQL versions to use it as in:

        .($account == null ? '' : " AND trans.account=".db_escape($account))

1,445

(17 replies, posted in Modules Add-on's)

Try to insert the following php code as the first code in the helloworld.php file after the php opening tag:

$path_to_root="../..";

This may be a problem with your specific version of PHP and/or platform for scope and visibility.

What versions of PHP/MySQL/Apache (or other WebServer) and platform (Linux/Windows) are you using?

PHP 5.3.1 on Windows XP SP3 running XAMPP 1.7.3 has it's output on localhost attached and working.

Note that array element inline addressing is available in later versions of PHP only.

The function get_balance() is defined from Line 316 of gl/includes/db/gl_db_trans.inc and it;s prototype is:

function get_balance($account, $dimension, $dimension2, $from, $to, $from_incl=true, $to_incl=true) 

The computed data fields available are: credit, debit and balance.

Note that this file has had a commit recently and you may need to update it accordingly.

1,447

(17 replies, posted in Modules Add-on's)

It appears that you are using an old version of the hello_world extension.

The rep704 can be improved by allocating the Dimensions space for the first and Supplier Name columns when no Dimension is chosen for the report.

How does the current commit get supplier_id stored now? It has only removed the redundancy available in lines 149-150 in gl/includes/db/gl_db_trans.inc.

Negative entries in gl_trans table for [trans_]type=20 (ST_SUPPINVOICE) have always had their person_id populated in it. The [trans_]type=25 (ST_SUPPRECEIVE) still do not populate the person_id field in it. The INSERT statement in line 48 allows such population based on a NOT NULL check of $person_type_id in lines 51 and 61 of gl/includes/db/gl_db_trans.inc. Also must such purchase GRNs have such an entry here at all? Only invoices (10, 20) and payments (12, 22) for sales and purchases need and have it.

Choose your Account Receivable using some other function/query and then use the get_balance() function with that value instead of 1065.

This commit can also be backported to FA 2.3.x as well by those on that branch still.