I am using version 2.3.18
It is the latest version.

Carmelo

Hi,
I created a Supplier Invoice with 8 items in it. Each item has a VAT value entered in a seprate entry.
When I see the General Ledger Transaction Details for this Supplier Invoice, I notice an entry refering to Foreign Exchange Gain.
I checked all settings I could think of and everything seems normal.
Can anyone think of what I am doing wrong? Or is it a bug?
Here is the General Ledger Transaction Details as observed after the entry:

General Ledger Transaction Details     Reference     Date     Person/Item
Supplier Invoice #2     2     01/11/2013     Supplier Amazing.com

Account Code     Account Name     Dimension          Debit     Credit     Memo
2100     Creditors Control Account                         471.40     admin
0030     Office Equipment                             82.86              admin
2218     VAT - 18% Taxable Goods/Services           14.91              admin
0030     Office Equipment                       47.80              admin
2218     VAT - 18% Taxable Goods/Services           8.60              admin
0030     Office Equipment                        47.82              admin
2218     VAT - 18% Taxable Goods/Services           8.60              admin
7501     Office Stationery                        94.43              admin
2218     VAT - 18% Taxable Goods/Services           16.99              admin
7501     Office Stationery                        16.64              admin
2218     VAT - 18% Taxable Goods/Services           2.99              admin
0030     Office Equipment                        119.95              admin
2218     VAT - 18% Taxable Goods/Services           21.58              admin
7501     Office Stationery                        5.61              admin
2218     VAT - 18% Taxable Goods/Services           1.01              admin
0030     Office Equipment                        41.38              admin
2218     VAT - 18% Taxable Goods/Services           7.45              admin
4920     Foreign Exchange Gain                                    67.22     admin  <----------------------
Total                                            538.62      538.62     

Any help about this would be appreciated.
Cheers, Carmelo

53

(9 replies, posted in Reporting)

Thanks apmuthu for updating the wiki.

What is not clear is that apart from the PDF file that I placed in reporting/forms do I have to create another headerX.inc file with code to add my PDF file?

Would I be asking too much if you could add some simple code example in the wiki?

Thanks in advance
Carmelo

54

(9 replies, posted in Reporting)

I am trying to follow these instructions as I would like to add a pdf file as a template for the invoice.
After creating the pdf file ( I called it back.pdf) I placed it in fa/reporting/forms folder.

What I don't understand is exactly where to call SetHeaderType() and what would the correct syntax be for the above file.

Thanks in advance
Carmelo

55

(5 replies, posted in Reporting)

Thanks Joe, right to the point.
Carmelo

56

(5 replies, posted in Reporting)

Businesses within the European Union are required to produce a report listing all invoices issued to clients (who have a VAT number registered in another country within the EU) on a quarterly basis. The report must include the VAT No of client, invoice no and value and date.

Is there a way to issue such a report in FA?
If not, which tables need to be accessed to extract such information?

TIA
Carmelo

Hi Janusz,
This method of reversal you are proposing is very good.
The International Financial Reporting Standards (IFRS) require that no transaction is deleted from the journal but instead a mistaken transaction should be reversed.
Therefore by adding the functionality you mention just improved the level of standard for Frontaccounting.

Perhaps while you are at it, you might also visit the voiding method of Invoices and other similar transactions.

It is quite tedious to notice that you had the date wrong after entering a batch of invoices. Voiding each one and re-entering them again. In this case, enabling only a change of date (as long as the period has not been closed) might save a ton of work correcting date mistakes.

Cheers, Carmelo

58

(9 replies, posted in Items and Inventory)

@tm totally agree.
The reason I took the route I did was so as not to change the database mid-way through a version.
There will be database changes in v2.4 but not within v2.3 although I stand corrected.

So what I did was that I took the current functionality and saved the url in the file rather than the image.
This may slow down the system if there are 1000s of items, so having the url's stored in the database would be a much better solution.

Cheers, Carmelo

59

(9 replies, posted in Items and Inventory)

Hi Joe,
Having a flag in the config file would be nice.
I did the necessary changes to have the image link to a url. The following are the changes I did. Two files were affected.

I hope this is considered useful and implemented in the core for version 2.4 (or before)

-----------------------------------------------------------------------------------------------
    Change Item Image to URL
-----------------------------------------------------------------------------------------------
fa/inventory/manage/items.php

Insert in Line 54 right after: $Ajax->activate('details');

if (isset($_POST['url']) && $_POST['url'] != '')
{
    $url = trim($_POST['url']);
    if (strpos($url, 'http') !== false)
    {
        $stock_id = $_POST['NewStockID'];
        $upload_file = 'Yes'; //Assume all is well to start off with
        $filename = company_path().'/images';
        if (!file_exists($filename))
        {
            mkdir($filename);
        }   
        $filename .= "/".item_img_name($stock_id).".url";
        $handle = fopen($filename, 'w');
        fwrite($handle, $url);
        $result=fclose($handle);
        if (!$result)
        {
            display_error(_('The link could not be saved'));
            $upload_file ='No';
        }
    }
}

--------------------------------------------------
~ Line 199 : REPLACE
            $filename = company_path().'/images/'.item_img_name($_POST['NewStockID']).".jpg";
            if (file_exists($filename))
                unlink($filename);

WITH:
            $filename = company_path().'/images/'.item_img_name($_POST['NewStockID']).".jpg";
            if (file_exists($filename))
                unlink($filename);
            $filename = company_path().'/images/'.item_img_name($_POST['NewStockID']).".url";
            if (file_exists($filename))
                unlink($filename);
               
--------------------------------------------------
~ Line 276 : REPLACE
        $filename = company_path().'/images/'.item_img_name($stock_id).".jpg";
        if (file_exists($filename))
            unlink($filename);

WITH:
        $filename = company_path().'/images/'.item_img_name($stock_id).".jpg";
        if (file_exists($filename))
            unlink($filename);
        $filename = company_path().'/images/'.item_img_name($stock_id).".url";
        if (file_exists($filename))
            unlink($filename);

-------------------------------------------------   
around line 418 REPLACE:
        // Add image upload for New Item  - by Joe
        file_row(_("Image File (.jpg)") . ":", 'pic', 'pic');
        // Add Image upload for New Item  - by Joe
        $stock_img_link = "";
        $check_remove_image = false;
        if (isset($_POST['NewStockID']) && file_exists(company_path().'/images/'
            .item_img_name($_POST['NewStockID']).".jpg"))
        {
         // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
            $stock_img_link .= "<img id='item_img' alt = '[".$_POST['NewStockID'].".jpg".
                "]' src='".company_path().'/images/'.item_img_name($_POST['NewStockID']).
                ".jpg?nocache=".rand()."'"." height='$pic_height' border='0'>";
            $check_remove_image = true;
        }
        else
        {
            $stock_img_link .= _("No image");
        }

WITH:
       
    // URL link for images added by Carmelo Romano on 25/07/2013
    $stock_img_link = "";
    $check_remove_image = false;
    url_row(_("Image Link") . ":", 'url', 'url');
    if (isset($_POST['NewStockID']) && file_exists(company_path().'/images/'
        .item_img_name($_POST['NewStockID']).".url"))
    {
        $url="";
        $filename=company_path().'/images/'.item_img_name($_POST['NewStockID']).".url";
        $handle = @fopen($filename, r);
       
        if ($handle) {
            $url = fgets($handle, 1024);
        }
       
        if (!empty($url)) {
            $stock_img_link .= "<a href='".$url."' target='_766266'>
                                <img id='item_img' alt = '[".$_POST["NewStockID"].".jpg"."]'
                                    src='".$url."'"." height='$pic_height' border='0'><br>
                                        Open image in New Window</a>";
           
            $check_remove_image = true;
        }
        fclose($handle);
    }
    else
    {   
        // Add image upload for New Item  - by Joe
        file_row(_("Image File (.jpg)") . ":", 'pic', 'pic');
        // Add Image upload for New Item  - by Joe
        $stock_img_link = "";
        $check_remove_image = false;
        if (isset($_POST['NewStockID']) && file_exists(company_path().'/images/'
            .item_img_name($_POST['NewStockID']).".jpg"))
        {
         // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
            $stock_img_link .= "<img id='item_img' alt = '[".$_POST['NewStockID'].".jpg".
                "]' src='".company_path().'/images/'.item_img_name($_POST['NewStockID']).
                ".jpg?nocache=".rand()."'"." height='$pic_height' border='0'>";
            $check_remove_image = true;
        }
        else
        {
            $stock_img_link .= _("No image");
        }
    }

------------------------------------------------   
fa/includes/ui/ui_input.inc

ADD:
//-----------------------------------------------------------------------------------
function url_cells($label, $name, $id="")
{
    if ($id != "")
        $id = "id='$id'";
    label_cells($label, "<input type='text' name='$name' size='35' />");
}       
function url_row($label, $name, $id = "")
{
    echo "<tr><td class='label'>$label</td>";
    url_cells(null, $name, $id);
    echo "</tr>\n";
}   


Regards, carmelo

60

(9 replies, posted in Items and Inventory)

I will try to get it to work as explained. If I am successful I would be pleased to send the code changes.

Carmelo

61

(9 replies, posted in Items and Inventory)

Thanks Joe,

Actually this may require less intervention than it seems. Instead of saving a .jpg file I manage to save a url written in a text file saved as .txt. Then when the image is called the file is opened and the url used as part of a <img src=URL />.

What do you think?

Thanks, Carmelo

62

(9 replies, posted in Items and Inventory)

Hi,
I wish to change the way the image is handled in the Item creation. I wish to insert a URL rather than upload an image, but I could not locate where in the database the reference to the uploaded image is made.

Any clue on where the image is referenced?

Thanks in advance
carmelo

Hi,
When I create a new Direct Invoice, the date defaults to today's date.
However, I enter by invoices in batches taken from written invoices with different dates.
It often happens that I forget to set the right date.

Is it possible to have the Invoice Date set to null for the new invoices so that if it is not entered an error is triggered?

Thanks
Carmelo

Hello Reza,
It seems that your language settings are not compatible with the english coa.
Before starting in English mode try to change the regional settings (in Control Panel) to English and see what happens.

Good luck
Carmelo

Hi Itronics,
Is the release of 2.4 with all the goodies still in the pipeline? Is there a target date?

Thanks
Carmelo

66

(6 replies, posted in Accounts Receivable)

So I did a serious attempt to getting this extra function, the ability to print a Request for Payment, which is identical to Sales Order Entry, but without loosing the Sales Order Entry function. I almost succeeded. However, almost is not good enough.
I did the following changes to the following files:

-----------------------------------------------------------------------------------------------
    Request for Payment
-----------------------------------------------------------------------------------------------
fa/applications/customers.php

line 25 ADD:
        $this->add_lapp_function(0, _("Request for Payment"),
            "sales/sales_order_entry.php?ReqPayment=0", 'SA_SALESINVOICE', MENU_TRANSACTION);

           
-------------------------------------
fa/sales/sales_order_entry.php

line 68 ADD:
} elseif (isset($_GET['ReqPayment']) && is_numeric($_GET['ReqPayment'])) {

    $_SESSION['page_title'] = _($help_context = "Request for Payment");
    create_cart(ST_REQPAYMENT, 0);

line 186 ADD:
} elseif (isset($_GET['ReqPayment'])) {
    $delivery = $_GET['ReqPayment'];

    display_notification_centered(sprintf(_("Request for Payment # %d has been entered."),$delivery));

    submenu_view(_("&View This RFP"), ST_REQPAYMENT, $delivery);

    submenu_print(_("&Print RFP"), ST_REQPAYMENT, $delivery, 'prtopt');
    submenu_print(_("&Email RFP"), ST_REQPAYMENT, $delivery, null, 1);
    set_focus('prtopt');

    display_note(get_gl_view_str(ST_REQPAYMENT, $delivery, _("View the GL Journal Entries for this RFP")),0, 1);

    submenu_option(_("Make &Invoice Against This RFP"),
        "/sales/customer_invoice.php?DeliveryNumber=$delivery");

        submenu_option(_("Enter a &RFP"),
            "/sales/sales_order_entry.php?NewRFP=0");

    display_footer_exit();
   
line 624 ADD:
    } elseif ($_SESSION['Items']->trans_type == ST_REQPAYMENT)
    {
        display_notification(_("This request for payment has been cancelled as requested."), 1);
        submenu_option(_("Enter a New Request for Payment"), "/sales/sales_order_entry.php?NewRFP=Yes");

line 735 ADD:
} elseif ($_SESSION['Items']->trans_type == ST_REQPAYMENT) {
    $idate = _("RFP Date:");
    $orderitems = _("Request for Payment Items");
    $deliverydetails = _("Enter RFP Details and Confirm RFP");
    $cancelorder = _("Cancel RFP");
    $porder = _("Place RFP");
    $corder = _("Commit RFP Changes");

-------------------------------------
fa/includes/systypes.inc
line 63 ADD:

        case     ST_REQPAYMENT   : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date");

-------------------------------------
fa/includes/sysnames.inc
line 41 ADD:
    ST_REQPAYMENT => _("Request for Payment"),

line 67 ADD:
    ST_REQPAYMENT => _("RFP"),

-------------------------------------
fa/includes/types.inc
line 41 ADD:

define('ST_REQPAYMENT', 34);

-------------------------------------
fa/reporting/includes/reporting.inc
line 51 ADD:

        case ST_REQPAYMENT :
            $rep = 109;
            // from, to, currency, email, quote, comments, orientation
            $ar = array(
                'PARAM_0' => $doc_no,
                'PARAM_1' => $doc_no,
                'PARAM_2' => '',
                'PARAM_3' => $email,
                'PARAM_4' => 2,
                'PARAM_5' => '',
                'PARAM_6' => $def_orientation);
            break;
           
-------------------------------------
fa/reporting/includes/doctext.inc
line 52 ADD:

        case ST_REQPAYMENT:
            $this->title = ($print_as_quote==1 ? _("QUOTE") : _("REQUEST FOR PAYMENT"));
            $this->formData['document_name'] =_("Order No.");
            $this->formData['document_date'] = $this->formData['ord_date'];
            $this->formData['document_number'] = $print_invoice_no == 0 && isset($this->formData['reference'])
                ? $this->formData['reference'] : $this->formData['order_no'];
            $this->formData['document_amount'] = $this->formData['order_no'];

            $aux_info = array(
                _("Customer's Reference") => $this->formData["customer_ref"],
                _("Sales Person") => get_salesman_name($this->formData['salesman']),
                _("Your VAT no.") => $this->formData['tax_id'],
                _("Our Order No") => $this->formData['order_no'],
                _("Delivery Date") => sql2date($this->formData['delivery_date']),
            );
            break;

-------------------------------------

My problems are at the end, when the Update or Accept is clicked. Is there anyone who can help with this?


Thanks in advance
Carmelo

67

(20 replies, posted in Reporting)

Hi,
In Malta and perhaps the rest of Europe, we have the same issue with the Zero % VAT. I think the way I setup FA, I get the reports correctly. I did the following:

1. Create a GL Acount ex 2220 VAT - Exempt without Credit (you have to create an account for each different type of VAT)
2. in Tax Types (under Setup) create the Tax Type you need to follow, for the above example:
VAT (Ex w Credit)     0.0     2220 VAT - Exempt with Credit/Exports     2229 VAT - Exempt Purchases for re-sale
3. In Tax Groups place this VAT into either the Domestic VAT or the Intra-Community & Non-EU Trade Group
4. In Item Tax Type create an entry such as: VAT Exempt w/o Credit and uncheck the box that is relevant to this entry.
5. It is important that you set up your Customers and Suppliers in the correct group for TAX type
6. Also items have to be placed in the correct type of VAT category.

The only problem I found with the above is when an item that is placed in the group to be charged VAT for sale, but is bought as a capital expense. In this case the use of Direct Invoice does not produce the correct results.

Please note: I am not an accountant and although I have checked the above with my accountant, I might be missing something important. So please check thoroughly the above and if possible report back with success or failure.

Carmelo

joe wrote:

No, not in 2.3 but it is in 2.4 that is about to ship in about a month.

/Joe

Joe, when is the 2.4 planned release?

69

(6 replies, posted in Accounts Receivable)

Anyone with a hint on how to duplicate the Sales Order Entry to provide another link on the Sales Tab named Request for Payment?

TIA
Carmelo

Hi,
We do a number of purchases from foreign suppliers who charge us in US$ or GBP.
As these purchases are paid using a Credit Card, we get the equivalent value in EUR.

Infact, the Credi Card Account is set in EUR.

When we settle the invoices we use the Supplier Payment Entry.  The supplier is selected. Note Supplier's base currency is USD. We see the Exchange Rate, e.g. 0.7639 = 1 Euro. The Credit Card Account is selected and we enter the amount indicated on the Bank's statement.

However, with this method we are not able to match the amount paid to the invoice.

What is the proper way to pay invoices in foreign currency?

Thanks
Carmelo

71

(6 replies, posted in Accounts Receivable)

I'm not sure what you have in mind when you said using the "statements report".
The Request for Payment (RFP) should be accessible like an invoice or a purchase order.

What I tried was to modify rep109.php around lines 80 to 90.
Here the $print_as_quote is used to print a Quote if it is set to 1 or a Sales Order otherwise.
But I could not find the source of $print_as_quote to set it as 2 and have the title set to "REQUEST FOR PAYMENT".

Ideally I would like to have a new link "Request for Payment" on the Sales Tab right under Sales Order Entry.

It seems to be a simple matter, but all my attempts failed.

Would appreciate anyone helping with this.
Cheers
Carmelo

72

(6 replies, posted in Accounts Receivable)

Hi, we need to generate a Request for Payment document.
The functionality in FA is almost the same as Sales Order Entry, i.e. the information kept by FA is the same. One can see what is pending with each client, etc.  The heading is different and there should be a notice that: This is not a VAT Invoice.

I tried to copy the Sales Order Entry Report, but it is intertwind with the Direct Invoice and got stuck.
We cannot use the Sales Order Entry as this is also required.

Perhaps to be a bit clearer, the process would be as follows:
1. Issue Sales Order Entry
2. Deliver Service
3. Issue (or convert Sales Order Entry) Request for Payment
4. After client pays, issue Invoice

Any ideas how I can do this?
Thanks
Carmelo

73

(3 replies, posted in Installation)

Now works like a dream .... thanks a million

Carmelo

I have installed the Dashboard Theme and it works great except for the charts.
Nothing is displayed in place of charts or graphs.

Could it be that I have to install some other graphic application on the Linux Centos Server I have FA running?
Thanks
Carmelo

ali002 wrote:
carmelr wrote:

Hi,
I too found the lack of a discount troublesome.
The solution I found was to create a new Item called Discount and enter a negative price for it.
Everything worked fine this way.

Cheers
Carmelo

How about the unit cost for the item ? I scared the unit cost are no longer accurate.

My solution was a discount on the total and not on a per item basis.
Carmelo