I see where this error is coming from.
Items & Inventory -> Inventory Item Movement always starts with 0
e.g. Quantity on hand before 11/05/2013 0
No matter what date I start this on, the starting quantity is always 0.
This is wrong, isn't it?
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → Posts by ckrosco
I see where this error is coming from.
Items & Inventory -> Inventory Item Movement always starts with 0
e.g. Quantity on hand before 11/05/2013 0
No matter what date I start this on, the starting quantity is always 0.
This is wrong, isn't it?
My inventory counts as reported in Inventory Planning Report and Inventory Item Movement do not match.
e.g. for one product, Inventory Planning Report shows 1,125, but Inventory Item Movement shows -225. Both for December 4, 2013.
FA 2.3.18
Any ideas why this is happening?
Just to clarify - Items & Inventory -> Inventory Item Movement is reporting the wrong inventory count. All other reports and pages dealing with inventory are correct.
From the reports in this discussion, it seems to be a size issue. If seahawk could do backup up until a certain date, after which it's not working, and assuming nothing else has changed, it's got to be the size of the database.
I have a test company with very little data, and a real company with ever expanding data. The test company backup function works fine, the other does not. They are on the same database.
Lately I've been using mysqldump, which does both companies in about 3 seconds.
I never found a solution for this. It seems to be related to the size of the database. The backup function works with my test company (with very little data), but not with my main company data. I now do backups with mysqldump.
Alvin - please let me know if you have problems with it. I have it working on my system, but I think there are still a few bugs.
My product is priced in grams, so we need the 6 decimal places for accuracy when converting to USD.
We've decided to just ignore these small errors showing on the trial balance.
The question came up because we have been using this system for a couple of years now, always with a perfect trial balance, even at 6 decimal places, but since February of this year, we have noticed these small errors.
Actually the problem is still showing up with 8 decimal places - the example above is now showing as:
Debit Credit
3,400.37235861 3,400.37235862
I suppose I can use 8 decimal places when invoicing and switch back to 6 for everything else, but isn't there a better solution?
After experimenting a bit, I can see that this is the result of a rounding error.
I can overcome this by increasing the number of decimal places on prices from 6 to 8.
Is there another solution?
I am using two currencies - selling in USD and buying in TWD, and my base currency is set to TWD.
I'm seeing errors in the general ledger which in think may be related to the currency conversion of sales invoices. This causes my trial balances to be out.
These are very small amounts, but I would like to know if anyone has a suggestion for me.
Here's an example:
General Ledger Transaction Details Reference Date Person/Item
Sales Invoice #3892 SI891 02/17/2013
Payment Status: Completed Amount: 104.56 USD
Account Code Account Name Debit Credit
4010 Sales 836.038821
4010 Sales 488.649855
4510 Discounts Given 97.729971
4010 Sales 893.697341
4010 Sales 288.289000
4510 Discounts Given 288.289000
4010 Sales 893.697341
1200 Accounts Receivables 3,014.353388
Total 3,400.372359 3,400.372358
However, the orders import is limited. It only creates order headers (customer, address, order total, etc.) in the FA sales_orders table, but the line items are not imported. So, an order is partially created in the DB, but you are not able to find those orders through the UI, because of the missing line items.
All items have to be in FrontAccounting before you can import orders from the Zen Cart database. When adding items in FA, the Item Code of FA has to match the Product ID of Zencart.
I've done some work on this module recently and it seems to be working quite well. There are a few quirks and limitations, but is quite useful for getting your ZC orders into FA.
Lines 261 & 262 of customer_payments.php are:
unset($_POST);
unset($_SESSION);
...so I guess that's why $_SESSION is undefined.
Whenever I post a payment against an invoice, I get the following error alert:
undefined variable: _SESSION in file: sales/customer_payments.php at line 266
Trying to get property of non-object in file: sales/customer_payments.php at line 266
This flashes by very quickly at the top of my screen (I had to do a video capture of the screen to read it) and does not seem to affect the payment.
Line 266 of customer_payments.php is:
meta_forward($_SERVER['PHP_SELF'], !$_SESSION['alloc']->trans_no ? "AddedID=$payment_no" : "UpdatedID=$payment_no");
What can I do to correct this?
Frontaccounting version 2.3.15
Since updating to 2.3.15 from the previous version, the database backup function is not working as before.
The .gzip and .zip options time out, but the uncompressed backups sometimes work.
Database size is the same as before, and I used to use the .gzip compression without any problems.
I would like to see a separate setting for decimal places for item prices.
Currently we buy and sell in grams, the prices being calculated to 6 decimal places.
We sell in another currency (USD), so would like the final price to be calculated to 2 decimal places.
I would like to see the "Price after tax" column in a sales invoice separately configurable from the "Total" column, just as exchange rates and percentages are separately configurable.
That would be great!
I get this message after clicking on the "Email this order" link:
SALES ORDER SO3658 has been sent by email to destination. Email: j
j happens to be the first letter of the intended email address - e.g. james@mycustomer.com
I have set up the email address in the customer contact section.
The email is not sent, though I receive a copy to the address specified to receive BCC emails in the company setup.
The customers email is directed to this address: j@mymailserver.com
This is with FA 2.3.15
Any ideas how I can correct this?
And here is a sample CSV file that I'm trying to import:
______________________________
entryid,date,reference,accountcode,dimension1,dimension2,amount,memo,person_id
5,12/05/2012,P5,5720,,,500,"7040335","Post Office"
5,12/05/2012,P6,5720,,,600,"7040336","Post Office"
5,12/05/2012,P7,5720,,,700,"7040336","Post Office"
5,12/05/2012,P8,5720,,,800,"7040338","Post Office"
6,12/06/2012,P9,5720,,,900,"7040339","Post Office"
6,12/06/2012,P10,5720,,,1000,"7040340","Post Office"
6,12/06/2012,P11,5720,,,1100,"7040341","Post Office"
6,12/06/2012,P12,5720,,,1200,"70403342","Post Office"
6,12/06/2012,P13,5720,,,1300,"7040343","Post Office"
I've been trying to modify import_multijournalentries.php so that I can import payments. The main change from the existing file is that the function add_bank_trans() has to be used instead of the outdated add_bank_transaction().
I have had a bit of success, but don't know where to go now. I give this to the world. Good luck world...
_____________________________________
<?php
/**********************************************
Author: Tom Hallman
Name: Import Multiple Journal Entries/Deposits/Payments v2.3
Free software under GNU GPL
***********************************************/
$page_security = 'SA_CSVMULTIJOURNALIMPORT';
$path_to_root="../..";
include_once($path_to_root . "/includes/ui/items_cart.inc");
include_once($path_to_root . "/gl/includes/db/gl_db_trans.inc");
include_once($path_to_root . "/includes/session.inc");
//include_once("../dBug.php"); //available from http://dbug.ospinto.com/
add_access_extensions();
// Turn these next two lines on for debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
//--------------------------------------------------------------------------------------------------
function init_entry(&$entry, $type, $date, $reference, $reference, $date, $person_id)
{
$entry = new items_cart($type);
$entry->order_id = 0;
$entry->tran_date = $date;
$entry->reference = $reference;
$entry->memo_ = 'Imported via \'Import Multiple Journal Entries\' plugin';
}
//--------------------------------------------------------------------------------------------------
function import_type_list_row($label, $name, $selected=null, $submit_on_change=false)
{
$arr = array(
ST_JOURNAL=> "Journal Entry",
ST_BANKDEPOSIT=> "Deposit",
ST_BANKPAYMENT=> "Payment"
);
echo "<tr><td class='label'>$label</td><td>";
echo array_selector($name, $selected, $arr,
array(
'select_submit'=> $submit_on_change,
'async' => false,
));
echo "</td></tr>\n";
}
//--------------------------------------------------------------------------------------------------
function check_journal_entry(&$entry, $entryid)
{
// Check that this journal entry adds up!
if (abs($entry->gl_items_total()) > 0.0001)
{
display_error("Error: journal entry with entryid '$entryid' does not balance (import file: '{$_FILES['imp']['name']}')");
return true;
}
}
function write_trans($type, $curEntryId, $bank_act, $reference, $date, $amt, $person_id)
{
if ($type == ST_JOURNAL)
{
if (!check_journal_entry($entry, $curEntryId));
write_journal_entries($entry, false, false); // FA built-in function
}
elseif ($type == ST_BANKDEPOSIT || $type == ST_BANKPAYMENT) {
add_bank_trans($type, $curEntryId, $bank_act, $reference, $date, $amt, 0, $person_id, $currency="", $err_msg="", $rate=0);
}
}
//--------------------------------------------------------------------------------------------------
function get_dimension_id_from_reference($ref)
{
if ($ref == null || trim($ref) == '')
return 0;
$sql = "SELECT id FROM ".TB_PREF."dimensions WHERE reference LIKE ".db_escape($ref);
$result = db_query($sql, "could not get dimension from reference");
$row = db_fetch_row($result);
return $row[0];
}
//--------------------------------------------------------------------------------------------------
// Begin the UI
include_once($path_to_root . "/includes/ui.inc");
page("Import Multiple Journal Entries / Deposits / Payments");
// If the import button was selected, we'll process the form here. (If not, skip to actual content below.)
if (isset($_POST['import']))
{
if (isset($_FILES['imp']) && $_FILES['imp']['name'] != '')
{
$filename = $_FILES['imp']['tmp_name'];
$sep = $_POST['sep'];
$type = $_POST['type'];
$bank_act = isset($_POST['bank_account']) ? $_POST['bank_account'] : "";
// Open the file
$fp = @fopen($filename, "r");
if (!$fp)
{
display_error("Error opening file $filename");
} else {
// Initialize first entryid & date to be null so that a new one is established
$curEntryId = null;
// Prepare the DB to receive the imported journal entries
begin_transaction();
// Process the import file
$line = 0;
$entryCount = 0;
$error = false;
$errCnt = 0;
while ($data = fgetcsv($fp, 4096, $sep))
{
// Skip the first line, as it's a header
if ($line++ == 0) continue;
// Skip blank lines (which shouldn't happen in a well-formed CSV, but we'll be safe)
if (count($data) == 1) continue;
// Parse the row of data; Format: entryid,date,reference,accountcode,dimension1,dimension2,amount,memo
list($entryid, $date, $reference, $code, $dim1_ref, $dim2_ref, $amt, $memo, $person_id) = $data;
// If the entryid has changed, create the current journal entry (if there was one) and start a new one
if ($entryid != $curEntryId) {
// Check that date is properly-formatted
if (!is_date($date)) {
display_error("Error: date '$date' not properly formatted (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
// Check that the date is in range
if (!is_date_in_fiscalyear($date)) {
display_error("Error: date not in fiscal year (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
// Assign a default reference if it is not specified
if ($reference == '') {
// If the entryid has shifted but date is the same, it needs another reference
if ($date == $curDate)
$refCount++;
else // else the entryid and date have shifted, so we can start with a new reference
$refCount = 1;
list($day, $month, $year) = explode_date_to_dmy($date);
$reference = "$month/$day-$refCount";
}
// Check that the reference is not in use
global $Refs;
if ($Refs->exists($type, $reference)) {
display_error("Error: reference '$reference' is already in use (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
//new dBug($curEntryId); //1st time = NULL; 2nd time = 5
print "<br />1<br />";
//new dBug($error); //$error is now equal FALSE
print "<br />2<br />";
// All good! Initialize a new entry - if $curEntryId = null -- first time through
if ($curEntryId !=null) {
//new dBug($error);
print "<br />3<br />";
if ($error = false)
{
write_trans($type, $curEntryId, $bank_act, $reference, $date, $amt, $person_id);
$entryCount++;
}
}
if ($error = true) //How does this become TRUE?
$errCnt++;
//new dBug($error);
print "<br />4<br />";
$error = false;
init_entry($entry, $type, $date, $reference, $reference, $date, $person_id);
$curEntryId = $entryid;
$curDate = $date;
}
if ($entryid == '') {
display_error("Error: entryid not specified (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
// Check that the account code exists
if (get_gl_account($code) == null) {
display_error("Error: Could not find account code '$code' (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
// Check that dimension 1 exists
$dim1 = get_dimension_id_from_reference($dim1_ref);
if ($dim1_ref != '' && $dim1 == null) {
display_error("Error: Could not find dimension with reference '$dim1_ref' (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
// Check that dimension 2 exists
$dim2 = get_dimension_id_from_reference($dim2_ref);
if ($dim2_ref != '' && $dim2 == null) {
display_error("Error: Could not find dimension with reference '$dim2_ref' (line $line in import file '{$_FILES['imp']['name']}')");
$error = true;
}
if ($type == ST_BANKPAYMENT)
$amt = -$amt;
// Add to the journal entry / deposit / payment
if (!$error)
$entry->add_gl_item($code, $dim1, $dim2, $amt, $memo);
}
// Process final entries in the file
if (!$error)
{
if ($curEntryId != null) {
write_trans($type, $curEntryId, $bank_act, $reference, $date, $amt, $person_id);
$entryCount++;
}
} else
$errCnt++;
@fclose($fp);
// Commit import to database
if (!$errCnt)
commit_transaction();
if ($type == ST_JOURNAL)
$typeString = "journal entries";
elseif ($type == ST_BANKDEPOSIT)
$typeString = "deposits";
elseif ($type == ST_BANKPAYMENT)
$typeString = "payments";
if (!$errCnt) {
if ($entryCount > 0)
display_notification_centered("$entryCount $typeString have been imported.");
else
display_error("Import file contained no $typeString.");
}
}
}
else
display_error("No import file selected");
}
start_form(true);
start_table(TABLESTYLE2);
if (!isset($_POST['type']))
$_POST['type'] = ST_JOURNAL;
if (!isset($_POST['sep']))
$_POST['sep'] = ",";
table_section_title("Import Settings");
import_type_list_row("Import Type:", 'type', $_POST['type'], true);
if ($_POST['type'] != ST_JOURNAL)
bank_accounts_list_row( $_POST['type'] == ST_BANKPAYMENT ? _("From:") : _("To:"), 'bank_account', null, false);
text_row("Field Separator:", 'sep', $_POST['sep'], 2, 1);
label_row("Import File:", "<input type='file' id='imp' name='imp'>");
end_table(1);
submit_center('import', "Perform Import");//,true,false,'process',ICON_SUBMIT);
end_form();
end_page();
?>
Please try again on the demo/training company.
Could it possibly be related to a product with item code "1"?
I can't create a product with item code 1 on the demo site - I'm getting a message that the item code is already in use.
A customer returned an order that was paid by credit card. I did the following:
1. Payment to customer to indicate credit card refund
2. Customer Transactions Inquiry -> Sales Invoice -> Credit This icon
3. Credit quantity = full amount of each item originally purchased -> Items returned to inventory
Now when I check the credit note (Customer Transactions -> Customer Credit Note) there is an extra item in the list. The customer originally bought 4 different items, and the credit note shows 5 items. The extra item has Item Code 1, and is the default item whenever I create a new sales order.
The credit note "TOTAL CREDIT" is the right amount, but the extra item should not be there.
FA v 2.3.12
After posting the above I realized that my PayPal csv file did not have these entries (Address Line 1 etc.) so I commented out the lines in the import_paypal_update.php file and the error messages are gone. Still no data being imported though.
With debugging turned on I get these error messages. I would appreciate any help to resolve this. FA 2.3.12
Undefined index: Address Line 1 in file: **path**/modules/import_paypal/import_paypal_update.php at line 303
Undefined index: Address Line 2/District/Neighbourhood in file: **path**/modules/import_paypal/import_paypal_update.php at line 304
Undefined index: Town/City in file: **path**/modules/import_paypal/import_paypal_update.php at line 305
Undefined index: State/Province/Region/County/Territory/Prefecture/Republic in file: **path**/modules/import_paypal/import_paypal_update.php at line 306
Undefined index: Zip/Postcode in file: **path**/modules/import_paypal/import_paypal_update.php at line 307
Undefined index: Postcode in file: **path**/modules/import_paypal/import_paypal_update.php at line 309
Undefined index: Country in file: **path**/modules/import_paypal/import_paypal_update.php at line 310
Undefined index: Item Title in file: **path**/modules/import_paypal/import_paypal_update.php at line 345
Undefined index: Item ID in file: **path**/modules/import_paypal/import_paypal_update.php at line 346
Undefined index: Item Title in file: **path**/modules/import_paypal/import_paypal_update.php at line 347
Undefined index: Insurance Amount in file: **path**/modules/import_paypal/import_paypal_update.php at line 352
Undefined variable: shipping in file: **path**/modules/import_paypal/import_paypal_update.php at line 373
Undefined variable: tax in file: **path**/modules/import_paypal/import_paypal_update.php at line 373
The lines 303 -310 in the import_paypal_update.php are as follows:
$address1 = $data["Address Line 1"];
$address2 = $data["Address Line 2/District/Neighbourhood"];
$address3 = $data["Town/City"];
$address4 = $data["State/Province/Region/County/Territory/Prefecture/Republic"];
$postcode = $data["Zip/Postcode"];
if (empty($postcode))
$postcode = $data["Postcode"];
$country = $data["Country"];
Lines 345 - 373 are as follows:
$memo = $data["Item Title"];
$item_code = $data["Item ID"];
$item_title = $data["Item Title"];
$currency = $data["Currency"];
$gross = str_replace(",","",$data["Gross"]);
$fee = str_replace(",","",$data["Fee"]);
$net = str_replace(",","",$data["Net"]);
$insurance = str_replace(",","",$data["Insurance Amount"]);
// shipping and tax have different headings in different paypal countries
if (array_key_exists("Shipping and Handling Amount", $data))
$shipping = str_replace(",","",$data["Shipping and Handling Amount"]);
elseif (array_key_exists("Postage and Packing Amount", $data))
$shipping = str_replace(",","",$data["Postage and Packing Amount"]);
elseif (array_key_exists("Postage and Packing", $data))
$shipping = str_replace(",","",$data["Postage and Packing"]);
if (array_key_exists("GST", $data))
$tax = str_replace(",","",$data["GST"]);
elseif (array_key_exists("VAT", $data))
$tax = str_replace(",","",$data["VAT"]);
elseif (array_key_exists("Sales Tax", $data))
$tax = str_replace(",","",$data["Sales Tax"]);
if ($use_paypal_trn_id) {
$ref = $data["Transaction ID"];
}
$type = strtoupper($data["Type"]);
log_message($type.", gross:".$gross.", fee:".$fee.", net:".$net.", shipping:".$shipping.", tax: ".$tax);
There is a SQL query in /modules/import_paypal/sql that you can run within PhPmyAdmin. This creates two new tables needed by this module.
I have been trying to use this and found a few peculiarities. If you are doing currency conversion, the conversion rates have to be entered prior to importing the PayPal.csv file. And the date for your company has to be in a specific format - Under preferences, select Dateformat = YYYYMMDD and the date separator as -
So far, all this does for me is to import withdrawals. I haven't been able to get it to import any sales yet.
Is anyone using this module?
I am using FrontAccounting 2.3.12
If you mean import_multijournalentries extension, probably there is some bug in the bank related code which will be fixed in a few next days.
Janusz
Was this ever fixed?
I am trying to use this module to import payments. I get a blank white screen after clicking the import button, and the entries are not imported.
Here is an example of what I am trying to import - a payment for shipping (account 5720):
entryid,date,reference,accountcode,dimension1,dimension2,amount,memo
1,08/01/2012,2,5720,,,268,7040336
Many Customers?
If you have many records you can enable Search Customer List in Company setup. You can then start a search by pressing a space in the Customer List, or use the edit box in front of the list if such one is available. Now enter fragment of Customer name and press tab. The list will now be populated with relevant records. If you enter a *, all records will be shown.
Yes, I know how to use the search customer list - it is my preferred method since I have a customer base of more than 2000.
I guess nobody else sees this as a bug or a flaw. It's bugging me because the previous versions would update the screen when a new bank account was selected.
As it is now, I have to manually refresh the screen to bring up the customer payment details, and then select the appropriate bank account for payment.
My method for using FA is to import orders into FA as Sales Order Entries, then process them one by one, finally adding the customer payment after each order is processed and invoiced.
It would be a great help if there was a link to customer payment after creating the invoice, and the customer payment details are already filled in, as is the case when processing a single order from start to finish (sales order entry to customer payment).
I can see that if the "search for customer" option is not selected, you will be forced to select the desired customer from a list and then the page will update as desired.
However, if there are many customers, the "search for customer" option is very handy.
I think it makes more sense for the page to update when the bank account is selected, or better yet, to have the customer name and payment details prefilled when going to the payment page.
FrontAccounting forum → Posts by ckrosco
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.