Refer links in the FA Wiki's main page.

Thanks Janusz. That was fast!

Commit Link.

* Delete a Purchase Order, (#2)
* Create a new one in it's place.
* Tested with the last one in the table (auto_increment)
* The New PO now takes this vacated value (#2) but the screen view shows the header line as PO #3 (the auto_incremented table id value) whilst the reference shows 2 and the printout (pdf) also shows it as PO 2.

This has potential for confusion but is probably left there to track the primary key of the actual record in the database.

@joe: any light?

When we try to edit the items in an purchase order where the Item Description is set to non-editable and contained double quotes, it was unnecessarily mangling a hidden POST variable and then messing up the purch_order_details table's item_description field. Also one instance of assignment duplication  stands removed.

--- includes/ui/po_ui.inc    Mon Sep 29 21:21:28 2014
+++ includes/ui/po_ui.inc    Wed Dec 31 07:50:07 2014
@@ -382,7 +382,6 @@
         if ($order->line_items[$id]->descr_editable)
             text_cells(null,'item_description', null, 45, 150);
         else {
-            hidden('item_description', $_POST['item_description']);
 //            label_cell($_POST['item_description']);
             label_cell($order->line_items[$id]->item_description); 
         }
@@ -394,7 +393,7 @@
     {
 //        hidden('line_no', ($_SESSION['PO']->lines_on_order + 1));
 
-        //Chaitanya : Manufcatured item can be purchased
+        //Chaitanya : Manufactured item can be purchased
         stock_items_list_cells(null, 'stock_id', null, false, true, false, true);
         //stock_purchasable_items_list_cells(null, 'stock_id', null, false, true, true);
         if (list_updated('stock_id')) {
--- includes/po_class.inc    Mon Sep 29 21:21:28 2014
+++ includes/po_class.inc    Wed Dec 31 07:45:31 2014
@@ -74,7 +74,6 @@
         $this->line_items[$line_no]->quantity = $qty;
         $this->line_items[$line_no]->price = $price;
         $this->line_items[$line_no]->req_del_date = $req_del_date;
-        $this->line_items[$line_no]->item_description = $description;
     }
 
     function remove_from_order($line_no)
--- po_entry_items.php    Mon Sep 29 21:21:28 2014
+++ po_entry_items.php    Wed Dec 31 07:45:30 2014
@@ -261,7 +261,7 @@
         }
     
         $_SESSION['PO']->update_order_item($_POST['line_no'], input_num('qty'), input_num('price'),
-              @$_POST['req_del_date'], $_POST['item_description'] );
+              @$_POST['req_del_date'], @$_POST['item_description'] );
         unset_form_variables();
     }    
     line_start_focus();

The Tmpl checkbox needs to be checked (ticked) in the Sales => Sales Order Inquiry to set the sales_orders.type=1.

Sales => Template Invoice

If we had earlier entered a Direct Invoice, then sales_orders.type=0 and will not display it in the Invoice Template listing.

This is due to line 503-504 in sales/includes/db/sales_order_db.inc:

        elseif ($filter=='InvoiceTemplates' || $filter=='DeliveryTemplates')
            $sql .= " AND sorder.type=1";

Is this the intended functionality?

What are the possible values of the sales_orders.type field and what do they indicate?

Even a fresh sales order results in sales_orders.type field being 0.

Also if a direct invoice is entered, the Invoice id is incremented but the Sales Order number is not incremented as seen in the Setup => Forms Setup screen. When the next sales order entry is made, the Sales Order number is incremented from it's old wrong value and hence remains wrong in the Setup => Forms Setup display.

Hence the next_reference field in the sys_types table can easily become out of sync with actuals. Instead of incrementing the values in the next_reference field, it is better to use the last_insert_id() + 1 or take max of field from appropriate table's primary key.

4,657

(7 replies, posted in Translations)

Thanks for the info. The solution in context is:

Solution
=================
in file includes/db/connect_db.inc
add one line
mysql_query("SET NAMES 'utf8'");

so the code become below
====
$db = mysql_connect($connection["host"], $connection["dbuser"], $connection["dbpassword"]);
   
mysql_query("SET NAMES 'utf8'");
        mysql_select_db($connection["dbname"], $db);
====

Thanks for the info. Will checkout the other themes after FA v2.4 integration is complete (hectic work is a pace in the Hg repo). Possibly some js glitches and version incompatibilities.

4,659

(0 replies, posted in Reporting)

Just wrote the Incorporation of Bin Location feature for FA v2.3.x without adding new fields. View my Tutorial in the Wiki's Bin Locations in Packing Lists page.

It is based on my other Forum Post.

Even in default theme, the Alt-I will not work if the tab has it and is available multiple times in the menu links.

4,661

(3 replies, posted in Accounts Receivable)

Change them in the debtors_master and crm_persons and crm_contacts tables as well.

4,662

(4 replies, posted in Reporting)

Then the size of the PDF file created is too big. Check your memory_limit and post_max_size and other apache conf and php.ini settings and change accordingly and restart your web browser and try again.

4,663

(4 replies, posted in Reporting)

Set your PDF association in your browser to display (with appropriate application) or download as you wish.

Check if non zero pdf files get created in company/0/pdf_files/ folder is created.

If the file size is zero, the there is an error in your report file generating script repXXX.php

Try in standard themes first.

4,665

(2 replies, posted in Reporting)

For reporting/rep110.php the following is in order:

--- old/reporting/rep110.php    Mon Sep 29 21:21:28 2014
+++ new/reporting/rep110.php    Mon Dec 29 23:35:10 2014
@@ -94,13 +95,13 @@
                     $rep->filename = "Packing_slip" . $myrow['reference'] . ".pdf";
                 }
             }
-            $rep->SetHeaderType('Header2');
             $rep->currency = $cur;
             $rep->Font();
             $rep->Info($params, $cols, null, $aligns);
 
             $contacts = get_branch_contacts($branch['branch_code'], 'delivery', $branch['debtor_no'], true);
             $rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY, $contacts);
+            $rep->SetHeaderType('Header2');
             $rep->NewPage();
 
                $result = get_customer_trans_details(ST_CUSTDELIVERY, $i);

Same problem here. It appears that the Tabs supercede the Menu Links.

In Purchases tab, try Alt+G - that works.

4,667

(2 replies, posted in Reporting)

The FrontReport method Header2() uses the property $formData which gets populated in it's method SetCommonData(). Therefore in all the reports, the SetCommonData() method and it's dependant data must be called before the header2() method is called. It is the Header2() method that calls the doctext.inc and header2.inc file which need the elements of the $formData property.

The $formData property is primarily a single dimension array with fields from various tables and variables.
If the same field name is culled from several tables and populated into the said property, then only the last one prevails.

4,668

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

There are still some extra commas in the header line where "1=supplier, 2=customer" comes in.
It's been reasonably corrected now in my GitHub repo.

What browser and version on what platform are you using it on?

4,670

(7 replies, posted in Translations)

Check the database and see if it is stored correctly there - if not then it could be an encoding issue in your database.

4,671

(3 replies, posted in Accounts Receivable)

check your sys_prefs table for some clues.

I have notified the author Ross Addison but got a cryptic auto reply from another email address!

Only one set of redundant notification lines were there that have been removed - all others are equivalent code for ease of readability besides another notification added for the state when on $trial there were no records.

It is placed in the forums so that users can directly partake of it and in context. Also, any eagle eyes that can spot any errors in it would be more than welcome to improve upon it.

Further cleanup has been done.

4,673

(3 replies, posted in Reporting)

You seem to have inverted your exchange rates by entering it manually!

Assuming
1 TZS = 0.00058 USD
means
1 USD = 1725 TZS

Instead of 1 : 1725 you may have made it 1725 : 1. This will result in 1725 * 1725 = 2975625 times the variance (nearly 3 million times)!

Remember your local currency is 1 and the exchange rate is the equivalent of 1 unit of your home currency in target currency.

4,674

(48 replies, posted in Setup)

Fantastic progress in FA v2.4 on the Hg Repo indeed.

Notes to extension maintainers:
Fix extensions based on the following changes of variables being replaced with functions consequent on them being moved from the config.php file to either the users table as extra fields (4) or into the sys_prefs table as records (8):

FA v2.3.22+ ==> FA v2.4
$alternative_tax_include_on_docs ==> $SysPrefs->alternative_tax_include_on_docs()
$no_zero_lines_amount ==> $SysPrefs->no_zero_lines_amount()
$print_invoice_no ==> $SysPrefs->print_invoice_no()
$print_item_images_on_quote ==> $SysPrefs->print_item_images_on_quote()
$show_po_item_codes ==> $SysPrefs->show_po_item_codes()
$suppress_tax_rates ==> $SysPrefs->suppress_tax_rates()

$allow_negative_prices ==> $SysPrefs->allow_negative_prices()
global $loc_notification ==> global $SysPrefs

$loc_notification ==> $SysPrefs->loc_notification()
$def_print_destination ==> user_def_print_destination()
$def_print_orientation ==> user_def_print_orientation()
$save_report_selections ==> user_save_report_selections()
$use_date_picker ==> user_use_date_picker()

ERPNext uses Python and MariaDB. Nice to know it shares compatibility with FA.

There are only a few changes in some files from v2.3.19 to v2.3.22+ and you can get it from the diffs in my GitHub repo.