26

(19 replies, posted in Accounts Payable)

Thanks for testing this out.

Are you saying that you are able to click on the COGS menu, it shows the 3 options, but when you try to select one of the options, Ajax runs, and the option returns to the initial value ("No")?

If you are actually testing my fork, the COGS menu is not Ajax enabled, and operates as a standard options menu, so Ajax should not run (you should not see the Ajax icon pop up when changing the value).

Note that the original pull request did Ajax enable the COGS menu, but that has been since simplified in my fork so that now the recosting is not run until the order is processed.

I do use this feature on a frequent basis, although for simplicity, only on invoices where the freight and other excess charges appear on the invoice itself.  If the freight appears on a separate invoice, I don't try to wrap it into the item cogs as I suggested.

27

(4 replies, posted in Development)

For a non-jquery approach, see this commit in my fork.

28

(8 replies, posted in Report Bugs here)

Regarding 7.4, you can safely ignore the error.

PHP 7.4 has better validation than earlier php.  I fixed a lot of these issues in my fork and I still need to post the fixes.  The fix for db_tags.inc is:

diff --git a/core/admin/db/tags_db.inc b/core/admin/db/tags_db.inc
index b33de82..96bdbe9 100644
--- a/core/admin/db/tags_db.inc
+++ b/core/admin/db/tags_db.inc
@@ -77,7 +77,7 @@ function get_tag_name($id)
        $result = db_query($sql, "could not get tag name");
        
        $row = db_fetch_row($result);
-       return $row ? $row[0] : '';
+       return $row == false ? false : $row[0];
 }

29

(5 replies, posted in Accounts Receivable)

Have you tried prepayments?

30

(6 replies, posted in Reporting)

This commit may help you write your code.

The error message means what it says, that the reference already exists on some other transaction.

I have seen this in vanilla FA when multiple browser tabs are opened on bank payments.  If this is the case, then the solution is simple.  Only display one bank transaction at a time; do not use another browser window to examine any other transaction before completing the edit of that transaction.

Otherwise the problem is that you have duplicate reference numbers.

If the date is used in the reference number, and you change the date, bingo, that is the problem.  Note that is OK if the year is part of the reference number if only the month or day is changed.

If the date is not used in the reference number, then you need to examine the database with a tool such as the mysql client and search for the reference number in the database to confirm if duplicate reference numbers exist in the database.

Vanilla FA quietly unreconciles an edited bank transaction.  The code fix for that is in my fork.

32

(1 replies, posted in Report Bugs here)

Setup->Fiscal Year.  Add the current year.

See http://mantis.frontaccounting.com/view.php?id=5338 for reason.

33

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

Use General Journal Processing, e.g.

000001/99,03/28/1998,"Bank Account 1:Funds Transfer",-500.00,3300,,,,,,
000001/99,03/28/1998,"Bank Account 2:Funds Transfer",500.00,1060,,,,,,

34

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

No.

But it does support journal entry to accomplish the same thing.

@apmuthu:  This function is in my osCommerce and Square extensions.  These extensions import sales orders into FA, which is the same purpose as Import Transactions -> Sales Orders.  The function retrieves the FA sales point by name suitable for populating $cart->pos, which allows an order to specify the bank account for a direct invoice payment.

The function isn't necessary.   The core provides get_sales_point($id) (sales/includes/db/sales_points_db.inc) which can be used to populate $cart->pos, if you know the mysql key to the sales point.   The function that I suggested allows the sales point to be retrieved by name rather than id.

Import Transactions -> Sales Orders does not have the ability to specify multiple sales points and neither does the core.  By design, the core relies on a single POS per user.  All user transactions use this POS.  To me, that design seems rather inflexible, and discussions about changing that design have not been well received.

Therefore, customization is required to pick and choose multiple sales points when running under a single user.  Import Transactions -> Sales Order could be customized by adding a sales point field (id or name) to the import file and then in the code setting $cart->pos = get_sales_point($id) or $cart->pos = get_sales_point_by_name($name).

Yes, that is the behavior that I would expect because import transactions inherits the POS from the user profile, which is why I suggested trying it as a first measure.

You could change the import transactions code to assign the POS based on some key in your input file.  It is not difficult.  The cart has a pos variable.  You just need to populate it with the pos that you want to use.  Define one POS for each payment method (cash, credit card, check, gift card, etc).

function get_sales_point_by_name($name)
{
        $sql = "SELECT pos.*, loc.location_name, acc.bank_account_name FROM "
                .TB_PREF."sales_pos as pos
                LEFT JOIN ".TB_PREF."locations as loc on pos.pos_location=loc.loc_code
                LEFT JOIN ".TB_PREF."bank_accounts as acc on pos.pos_account=acc.id
                WHERE pos.pos_name=".db_escape($name);

        $result = db_query($sql, "could not get POS definition");

        return db_fetch($result);
}

$cart->pos=get_sales_point_by_name("Credit Card");

FA limits direct customer sales invoices to cash accounts.  This is because Setup->Points Of Sales->Default Cash Account is limited to cash accounts.  This is easily overridden with the code change:

--- a/core/sales/manage/sales_points.php
+++ b/core/sales/manage/sales_points.php
@@ -130,7 +130,11 @@ text_row_ex(_("Point of Sale Name").':', 'name', 20, 30);
 if($cash) {
        check_row(_('Allowed credit sale terms selection:'), 'credit', check_value('credit_sale'));
        check_row(_('Allowed cash sale terms selection:'), 'cash',  check_value('cash_sale'));
-       cash_accounts_list_row(_("Default cash account").':', 'account');
+
+        // POS systems often allow direct deposit into bank accounts,
+        // so do not restrict the POS "cash sale" to cash accounts
+       // cash_accounts_list_row(_("Default cash account").':', 'account');
+       bank_accounts_list_row(_("Default account").':', 'account');
 } else {
        hidden('credit', 1);
        hidden('account', 0);

By making this code change, a pos can be created with a non-cash account.   Then use Setup->User Accounts Setup to create a user with this POS.  Then try import transactions using this user.

I do not know if this will work, but it may get you further than before.

I do know that the rest of FA tolerates this change because my site uses this.  But I do not use Import Transactions for this purpose.

38

(8 replies, posted in Report Bugs here)

Database errors should not be allowed in FA and should be prevented by additional checks.  Please open a bug report at http://mantis.frontaccounting.com/main_page.php referencing this thread.

39

(5 replies, posted in Items and Inventory)

Sales orders are canceled, not voided.  You can use Sales->Sales Order Inquiry to see the sales orders, select a sales order, edit, and cancel.

Of course that raises the question, "How do I find the sales order that uses the item?".  You might need to examine the database to find it.

40

(1 replies, posted in Dimensions)

Try the G/L P&L report, selecting a single dimension.  If that looks like what you want, then you could easily modify that report to iterate through all the dimensions.

I realize that this is an old topic, but I've just wiki-ed the following procedure to edit Direct Supplier Invoices:

    1. First void the invoice (Setup->Void A Transaction)
    2. Void the delivery.  Note that the delivery cannot be voided until the invoice is voided.
    3. Purchases->Outstanding purchase orders maintenance: Edit the PO.  You can change date, add or remove items.
    4. Purchases->Outstanding purchase orders maintenance: Receive the PO
    5. Purchases→Supplier Invoices: Invoice the PO

git apply <diff file>

or edit the source file manually.

Presently you can do this by item by setting the item's Inventory Adjustments Account.  Perhaps set all manufactured items to use waste and shrinkage instead of purchase price variance.  But if you want to use more than one account per item and then pick and choose when you make the adjustment, you will have to change the code.

The report that prints sales orders (not invoices) could be simplified.  Try this:

diff --git a/core/reporting/rep109.php b/core/reporting/rep109.php
index ba6c86c..434deb8 100644
--- a/core/reporting/rep109.php
+++ b/core/reporting/rep109.php
@@ -57,14 +57,6 @@ function print_sales_orders()
 
     $cur = get_company_Pref('curr_default');
 
-    if ($email == 0)
-    {
-
-        if ($print_as_quote == 0)
-            $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize(), 9, $orientation);
-        else
-            $rep = new FrontReport(_("QUOTE"), "QuoteBulk", user_pagesize(), 9, $orientation);
-    }
     if ($orientation == 'L')
         recalculate_cols($cols);
 
@@ -77,34 +69,26 @@ function print_sales_orders()
         $baccount = get_default_bank_account($myrow['curr_code']);
         $params['bankaccount'] = $baccount['id'];
         $branch = get_branch($myrow["branch_code"]);
-        if ($email == 1)
-            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+
+        if ($i == $from || $email == 1)
+            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+        if ($print_as_quote == 1)
+        {
+            $rep->title = _('QUOTE');
+            $rep->filename = "Quote" . $i . ".pdf";
+        }
+        else
+        {
+            $rep->title = _("SALES ORDER");
+            $rep->filename = "SalesOrder" . $i . ".pdf";
+        }
         $rep->SetHeaderType('Header2');
         $rep->currency = $cur;
         $rep->Font();
-        if ($print_as_quote == 1)
-        {
-            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
-            if ($print_as_quote == 1)
-            {
-                $rep->title = _('QUOTE');
-                $rep->filename = "Quote" . $i . ".pdf";
-            }
-            else
-            {
-                $rep->title = _("SALES ORDER");
-                $rep->filename = "SalesOrder" . $i . ".pdf";
-            }
-        }
-        else
-            $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER"));
-        $rep->currency = $cur;
-        $rep->Font();
         $rep->Info($params, $cols, null, $aligns);
 
         $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true);
         $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
-        $rep->SetHeaderType('Header2');
         $rep->NewPage();
 
         $result = get_sales_order_details($i, ST_SALESORDER);
@@ -218,12 +202,8 @@ function print_sales_orders()
             $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2);
         }    
         $rep->Font();
-        if ($email == 1)
-        {
-            $rep->End($email);
-        }
+        if ($i == $to || $email == 1)
+            $rep->End($email);
     }
-    if ($email == 0)
-        $rep->End();
 }

45

(6 replies, posted in Reporting)

If there is a problem with the latest 2.4.8 FA code base and not with an earlier FA code base, that would suggest that a recent commit introduced the problem.  You could try to isolate the problem by checking out successive earlier versions until you find one that works.

After you enter an invoice, what does view the g/l entries from this invoice look like?  Does that look correct?

I am sorry I cannot be of more help right now.

46

(6 replies, posted in Reporting)

I don't have the time to test this, but I think that the intention is that the supplier invoice G/L just use QE that are of type supplier invoice/credit, because the ability to even use any QE hinges on whether a QE with that type is defined (see, function has_quick_entries).  So perhaps the code needs to enforce this and prevent the use other types of QE?

I would also try to use or make a QE that is not a bank account and see if the problem occurs.  I recall that I had to disable QE bank account G/L in my fork to prevent problems.

47

(5 replies, posted in Dimensions)

Thats a good question and it looks like the decision has been made to add dimensions to A/R and A/P in FA in 2.4.8.     In my fork, all G/L entries including A/R, A/P, taxes, discounts, etc all have dimensions if the invoice is assigned a dimension.  Its the only way to get an accurate P/L by dimension.

If you mean by "not cleared list" to be the list of unreconciled transactions, then the FA Reconcile Bank Account function is all you need, assuming that you mark cleared transactions manually using this function.

If you somehow want the software to compare the list of FA transactions against a downloaded bank statement and show which transactions are not cleared, then the latest version of Bank Auto Reconcile Extension might help.

Go to this order on the FA demo site.

1. Does this page look like your page?
2. Change the date to 12/31/2019 (so that it is in the correct fiscal year).
3.. Press Process Receive Items.  Did it work?

If this works on the demo site and not your site, then there is some code or data difference that is preventing it from working on your site.

(Note: this can only be tested once.  To test multiple times, enter a new purchase order and try again).

The issue with your reload option is if it is NOT pressed.  That is, if the list is left with option C as the user selected, the rest of the page is now inconsistent because the page was not loaded with the option C data.

I do not have any more to say about this problem other than to recommend detkenn's solution which minimizes the data loss to the user when ajax fails to load the page properly.

Good luck.