2,126

(6 replies, posted in Reporting)

If you center the amounts in the body of the invoice, they will not align correctly for the decimal places. But if you still want it, then amke line 61 of reporting/rep107.php:

    $aligns = array('left',    'left',    'right', 'center', 'right', 'right', 'right');

to be:

    $aligns = array('left',    'left',    'right', 'center', 'right', 'right', 'center');

The top summary table has it's elements already center aligned in the English version - see attachment. The values in it are populated in the $aux_info array in reporting/includes/doctext.inc file.

The file reporting/includes/header2.inc that the invoice report uses aligns the values in it's lines 167-175 ('C'):

        foreach($aux_info as $info_header => $info_content)
        {

            $this->row = $iline2 - $this->lineHeight - 1;
            $this->TextWrap($col, $this->row, $width, $info_header, 'C');
            $this->row = $iline3 - $this->lineHeight - 1;
            $this->TextWrap($col, $this->row, $width, $info_content, 'C');
            $col += $width;
        }

2,127

(1 replies, posted in Reporting)

State what report in FA closely resembles the one you want and provide a screenshot of a mockup of your target report.

2,128

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

This is a very important extension for FA and should have been built into the core as export/import are the important integration hooks for other applications to exchange data.

@itronics: please update the pkg repo accordingly.

The Unicenta/OpenBravo POS is a compiled application for Windows/Linux/MacOS etc and is currently at v4.1. The database is at v3.91.3 and uses the Apache Derby DB by default. It can be configured to use MySQL database among others, but no public MySQL schema for it is commonly available. Make a set of unitary transactions in Unicenta POS and at each execution list the database changes that have occurred with respect to the actual transactions done that you want to port to FA. Then use and possibly extend the SlimREST API for FA as desired.

The user input control functions that provide the dropdown select box php code should not get confused and the search delimiters should not be ambiguous. URL encoding too will convert space to "+".

We can also add the back tick character to the forbidden list it as well - "`". A semicolon too may be added to the list.

Here is an elegant way to check a string for presence of any character in an array:

$arrayOfBadCharacters =array(' ', "'", '"', '+', '&', chr(9), chr(10), chr(13), '`', ';');
$chars = preg_quote(implode('', $arrayOfBadCharacters));
if(preg_match('/['.$chars.']/', $_POST['NewStockID']) {
    // bad character(s) found
}  

These bad characters may be stripped off and the code used instead of throwing an error.

2,131

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

The direct Sales Invoice Imports works as per attachment.

@joe: can now commit it to official pkg repo.

2,132

(22 replies, posted in Accounts Receivable)

The addition af a nice POS into FA would make it very usable for the retail segment. Nevertheless, there are many dedicated POS systems with great advancements in it's development that to replicate the effort here would dilute the offering as voluntary maintainers with core skills and interests are hard to find and would be spread thin for it to be sustainable. Hence the need to natively integrate with an FA connector to popular Open Source POS applications.

A rudimentary POS in FA is the Direct Invoice entry screen. With a proper native FA RestAPI in place, integration with any POS by building a connector would become relatively easy.

@boxygen: nice corollary.
@joe: can commit.

2,134

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

The sales document types were missing for processing them. They have now been added.
Possible errors that may still remain are the fixed asset parameter in FA 2.4 for adding an invoice though a synch with the core cart class has been done.
The core may not yet have to be modified to degrade gracefully if the results of these changes demonstrate.

2,135

(2 replies, posted in Installation)

If you have different databases for each company, then there is no need to change the table prefix. Just put in the correct prefix into the company_db.inc file for the specific company's array element before usage.

2,136

(27 replies, posted in Accounts Receivable)

The Direct Invoice entry would suit such Cash entries with the Credit Card info in the memo with a pdf attached as a document to it. Possibly modify it for another menu link by hardcoding a Direct Credit Card Invoice entry.

Better still, use a POS and import transactions into FA.

2,137

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

@joe: Thanks for the commit.

@notrinos: great!
@boxygen: thanks for your perseverance and persistence

Lines 160 to 169 in includes/ui/ui_controls.inc:

function meta_forward($forward_to, $params="", $timeout=0)
{
    global $Ajax;
    echo "<meta http-equiv='Refresh' content='".$timeout."; url=$forward_to?$params'>\n";
    echo "<center><br>" . _("You should automatically be forwarded.");
    echo " " . _("If this does not happen") . " " . "<a href='$forward_to?$params'>" . _("click here") . "</a> " . _("to continue") . ".<br><br></center>\n";
    if ($params !='') $params = '?'.$params;
    $Ajax->redirect($forward_to.$params);
    exit;
}

can now be modified to:

function meta_forward($forward_to, $params="", $timeout=0, $return=false) 
{
// $return argument is set to true if form submission has not yet been done and the form data is still needed
    global $Ajax;
    echo "<meta http-equiv='Refresh' content='".$timeout."; url=$forward_to?$params'>\n";
    echo "<center><br>" . _("You should automatically be forwarded.");
    echo " " . _("If this does not happen") . " " . "<a href='$forward_to?$params'>" . _("click here") . "</a> " . _("to continue") . ".<br><br></center>\n";
    if ($params !='') $params = '?'.$params;
    $Ajax->redirect($forward_to.$params);
    if (!$return) exit;
}

@joe: can commit this.

2,139

(8 replies, posted in Setup)

Every Chart of Accounts used in FA should have a P&L Account or you create it if it is absent. This is necessary to take in the net difference cr/dr of all the expense and income accounts for the year on fiscal closure and transfer it to the balance sheet at that time.

1. Your first JE should be to place the tax from the sales account (dr) to the credit of the Tax Accrued Account (if tax is included). This removes the tax out of the sales revenue.
2. When the tax period finishes, debit the Tax Accrued Account and credit the actual Tax (Payable) Account. This empties the Tax Accrued Account.
3. When the tax payment is effected, debit the Tax (Payable) Account and credit the Bank whose cheque you are paying with. This empties the Tax (Payable) Account.

Read the section "Using the Tax System" in the Tax System Configuration page in the wiki for when each JE gets passed or should be entered..

2,141

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

The missing 2nd argument for the $Refs->is_valid() method has been fixed using a session value - if this does not work, then the transaction type ($type) must be passed on as an argument to the can_process() function.

There is also a fix needed to the core for tax groups function. Line 128 of taxes/db/tax_groups_db.inc:

function get_shipping_tax_as_array($id)

should be:

function get_shipping_tax_as_array($id=null)

@joe: can fix the core.

2,142

(2 replies, posted in Reporting)

Wiki-ed it.

2,143

(22 replies, posted in Accounts Receivable)

Currently there is no direct integration of FA with any external POS within FA. You will need third party integration code or import / export transactions between the two. FA has import/export items and import transactions as official extensions.

Entry would be CR Bank
and DR Net Tax Payable

See this post.
Also read the wiki.

2,145

(21 replies, posted in Reporting)

The "original" if for the devs to compare. The ".diff" is for the devs to patch the repo. Only the "altered" is for your install.

@notrinos: Why does it work everywhere else? What happens if the "exit;" is commented out in the main function itself?

@joe: was that some debug code that got left behind or do we need another argument for the function to conditionally execute an exit?

Yes. Enter a credit and a debit entry atleast. You have entered only a debit to Account 2160. Where do you want to credit it? Possibly credit to some Tax Expenses / Tax Paid Account.

2,148

(21 replies, posted in Reporting)

The extension file must overwrite the one in the modules/rep_customer_ledger folder.
The files in the core will have to be replaced from the "altered" folder in the file attached in my previous post.

2,149

(27 replies, posted in Accounts Receivable)

Yes. Only then can you track all such transactions separately.

If someone comes to the shop and buys on cash sale and you prepare a cash invoice and then he says I'll pay you in the evening and if he does or doesn't - it will only be remembered in your mind (or in the memo field) till then!

2,150

(21 replies, posted in Reporting)

This requires changes to the core FA attached.
The modified report extension is available from here.

@joe: please commit the attachment for making the Areas Filter on reports have an "No Areas Filter" option in the dropdown box.