Skip to forum content
FrontAccounting forum
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options (Page 110 of 245)
Topics by apmuthu User defined search
Posts found: 2,726 to 2,750 of 6,111
The file at gl/inquiry/gl_trial_balance.php is sought to be altered using the essential diff as:
--- gl/inquiry/gl_trial_balance.php Thu Nov 12 03:19:51 2015
+++ gl/inquiry/gl_trial_balance.php Wed Aug 30 15:59:57 2017
@@ -84,6 +84,16 @@
$begin = $_POST['TransFromDate'];
$begin = add_days($begin, -1);
+ $Apdeb=$pdeb;
+ $Apcre=$pcre;
+ $Acdeb=$cdeb;
+ $Accre=$ccre;
+ $Atdeb=$tdeb;
+ $Atcre=$tcre;
+ $Apbal=$pbal;
+ $Acbal=$cbal;
+ $Atbal=$tbal;
+
while ($account = db_fetch($accounts))
{
//Print Type Title if it has atleast one non-zero account
@@ -157,6 +167,29 @@
}
display_trial_balance($accounttype["id"], $accounttype["name"].' ('.$typename.')');
+ }
+
+ if (!check_value('Balance'))
+ {
+ start_row("class='inquirybg' style='font-weight:bold'");
+ label_cell(_("Total") ." - ".$typename, "colspan=2");
+
+ amount_cell($pdeb-$Apdeb );
+ amount_cell($pcre-$Apcre);
+ amount_cell($cdeb-$Acdeb );
+ amount_cell($ccre-$Accre );
+ amount_cell($tdeb-$Atdeb );
+ amount_cell($tcre-$Atcre);
+ end_row();
+ }
+ else
+ {
+ start_row("class='inquirybg' style='font-weight:bold'");
+ label_cell(_("Total") ." - ".$typename , "colspan=2");
+ display_debit_or_credit_cells($pbal-$Apbal);
+ display_debit_or_credit_cells($cbal-$Acbal );
+ display_debit_or_credit_cells($tbal-$Atbal);
+ end_row();
}
}
@joe: want to include this in the core?
The attachment has a few whitespace fixes as well.
Here is a tedious way of troubleshooting it.
Turn on all debug including select in sql trail in the config file.
Insert the troubleshooting code at each place in the FA scripts sequentially to inspect where the error comes in.
Sample troubleshooting code:
$log_output = "\n\n Start dump of all variables \n\n" . print_r(get_defined_vars(),true) . "\n\n";
file_put_contents('D:/XAMPP/htdocs/fa24/tmp/log_file.txt', $log_output, FILE_APPEND);
When viewing an old / existing quote, the Reference Number must be taken from the table record and not the next one.
1. In file sales/view/view_sales_order.php line 42:
$_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no'], true);
should be replaced with
$_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no']);
as the last parameter in the Cart class (defined in sales/includes/class_cart.inc) constructor is for determining if a new Reference is to be taken or an existing one is to be used. This is how it is in FA 2.3.26 where the last parameter if false is omitted as that is the default for the constructor..
2. The leading semicolon (;) on line 96 can be removed as well in the same file.
3. The line 24 in the Cart class file sales/includes/class_cart.inc:
can be corrected to
as it is used that way in all the scripts and in the extensions.
@joe: can commit this. - Committed
To replace line 206 in reporting/rep101.php:
if ($no_zeros && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0) continue;
with
if ($no_zeros) {
if ($show_balance) {
if ($trans['TotalAmount']== 0) continue;
} else {
if (floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0)) continue;
}
}
@joe: want to commit it?
Committed
Try to see if the latest debian based php version solves your issue.
Check out MariaDB as well.
The easiest way is for you to use the companys' default base home currency as IDR and work from there using standard 8 decimal places for exchange rates and 2 decimals for prices/amounts.
You can play around with the constant FLOAT_COMP_DELTA defined in current_user.inc which is by default set at 0.004. Checkout the function round2() and number_format2() on the use of the value +/- .0000000001 in the same file.
Also see if you can use a larger unit for items to get meaningful rates per unit.
Try 8 decimal places for Exchange Rates and 0 or 2 decimal places for Prices/Amounts.
Any upgrade will require the first login to be admin on the default company. Thereafter, a login as admin for each company will be in order. The value of the version_id in the sys_prefs table must be 2.4.1 as of now - that is the current database schema version.
1. Take a backup of the database for all companies individually before any upgrade.
2. All v2.3.x installations must first upgrade to the v2.3.26 version even if there is no db change necessary.
3. Take a backup of each company individually again now.
4. Then make sure all is well by checking out the various company instances.
5. Take note of non FA tables and tables belonging to various FA Extensions and the changes in the tables some extensions may have made.
6. Make a clean FA 2.4 installation and use it in the following steps.
7. Create each company manually with the standard en_US.sql in the FA 2.4.x install.
8. Import the FA 2.3.26 backup from step 3 above for every non default company (assuming your default company is just a dummy one)
9. Login as admin into each upgraded company and verify that the software upgrade shows as having been done.
10. Copy over the company folder image and custom reports assets into the new installation.
11. Now install your extensions and verify they work and tweak their tables and changes as needed.
12. Any custom code / tables / schema mods you may have done in 2.3.x must then be ported professionally.
The final fix for this would be to replace the following lines in inventory/manage/items.php:
submit_center_first('addupdate', _("Update Item"), '',
$page_nested ? true : 'default');
submit_return('select', get_post('stock_id'),
_("Select this items and return to document entry."), 'default');
with
if (@$_REQUEST['popup']) hidden('popup', 1);
submit_center_first('addupdate', _("Update Item"), '',
$page_nested ? true : 'default');
submit_return('select', get_post('stock_id'),
_("Select this items and return to document entry."));
@joe: you can commit this now.
Committed
The function submit_return() defined in includes/ui/ui_input.inc takes in 3 arguments but it's usage in inventory/manage/items.php shows 4 arguments. The last one in it can be omitted.
Please note that it's usage in items.php when F4 is invoked (or independantly invoked as in http://localhost/fa24//inventory/manage/items.php?stock_id=101&popup=1) hides the "Select" button on item change in drop down box or on update. This needs to be rectified. This is because when first invoked, the GET parameter popup=1 is available. On subsequent ajax and other posts, it is not available and the conditional submit() in the submit_return() blanks it out.
The actual Items Select button html is:
<button
class="ajaxsubmit"
type="submit"
aspect="selector" rel="101"
name="select"
id="select"
value="Select"
title="Select this items and return to document entry.">
<img height="12"
alt=""
src="../../themes/default/images/ok.gif">
<span>Select</span>
</button>
Only some Sales Quotes have the original Quote Date editable whilst others do not. Also when the Customer name, Branch, Valid Till Date and Payment Terms are changed, the reference value shown in the View Sales Quote page reverts to the first number in the template but the database entries and Print Sales Quote are okay.
Make sure that the company folder and all it's subfolders are writeable by the web server owner.
To enlarge the F2 screen for customers replace Line 506 in includes/ui/ui_controls.inc from
113, _("Customers"), 900, 500),
with
113, _("Customers"), 900, 600),
@joe: can commit this.
Committed
Why are we sprinkling variable and array assignments in files that otherwise contain functions only?
There is no way to extend / change the validity end date of a quotation for cash only quotes.
After applying @itronics update:
Fiscal years 2016 and 2017 are open.
Company is set to Fiscal Year 2016.
3 Quotes - Nos. 1,2,3 are created in 2017 fiscal year.
1 Quote - No. 4 is created in 2016 fiscal year now during Aug 2017.
The View Quote shows the reference as 004/2016 whereas it should be 001/2016 which it is in the refs table.
The Print Quote shows 001/2016 as the Quote No (reference) in the header and in the middle, it shows Quotation No. 4.
These need to be fixed as well.
Whilst this is being done by fixing the function get_sql_for_sales_orders_view() in sales/includes/db/sales_order_db.inc, the indents of the last few lines before the return statement in it can be fixed as well.
Also the function date2sql() in includes/date_functions.inc can be fixed by replacing:
if ($date_ == null || strlen($date_) == 0)
return "";
$date_ = trim($date_);
with
$date_ = trim($date_);
if ($date_ == null || strlen($date_) == 0)
return "";
Committed
If a Sales Quotation is entered in the current fiscal year then all is okay.
Why should you quote as of any older fiscal year?
Check your install and you will find that the Company's current fiscal year is 2016 instead of 2017 (hope you have created 2017).
@joe: I can confirm this to be an issue in FA 2.4.2+. If you enter a Sales Quotation (possibly Sales Order too) in any previous fiscal year then it will not show up in a transaction search (Sales Quotation Inquiry). Also in a listing of Sales quotations, we can disable the GL entries icon. Any further new / edit Sales Quotation entry will show up the last reference value instead of the relevant next ref value for the new one / same reference value of the one to be edited.
Best is not to allow creation of any Sales Quotation in any previous fiscal year with an allow override permission for edge cases like accounting from archived vouchers. In any case this issue needs resolution.
Try the module manually first and see if it works well. Then check the difference in the backups for both zencart and FA for a single data set. Now map those new data from zencart to FA and create a cron job to execute the sql select from zencart and insert into FA.
Check your db tables and remember you are using a non-numeric table prefix.
In the db:
1. You have 2 entries for the same item in the same sales quotation but no sales order.
2. You have 1 sales quotation (and the corresponding entry in the refs table).
3. You have no sales invoices.
These can be verified in the Setup -> View/Print Transactions page.
Here is how to trouble shoot it.
1. Take a backup of a freshly installed en_US-demo.sql based default company.
2. Take another backup of your company db.
3. Replace all company db table's prefixes with "0_" to match the first one.
4. Use any diff tool (WinMerge) to check the differences between the two backups.
You did not have the 2017 year in your fiscal years table and I have created it.
You made the sales quotation in Aug 2017 and expected it to be valid till end of Jan 2017!
Your operational fiscal year was 2016 and hence the reference was needed to be reset each time as your quote was for 2017. I have now made it to be the newly created fiscal year 2017.
Now all is well.
The files in the sql folder used are:
alter2.4rc1.php
alter2.4rc1.sql
alter2.4.php
alter2.4.sql
Whilst the *.sql files bring the schema uptodate, the *.php files migrate the data carefully into the new constructs and then cleans up the old ones.
As of Feb 2016, the cambell-prince repo had some PHP 7 fixes.
Change all class constructors to be PHP 7 compliant. See this post.
Ref:
https://wiki.php.net/rfc/remove_php4_constructors
https://cweiske.de/tagebuch/php4-constructors-php7.htm
eBook preview of constructor
There have been less than 75 posts each month recently. Sep/Oct/Nov 2016 saw a lot of Spam.
Banned Users 2611
Un Verified Users 244
Non Posing Users 611
Normal Users 2617
If you have registered and did not receive your email address verification mail, check your spam box or junk mail box for it. The "Un Verified" users line above refers to such instances.
The references table setup and usage is different/enhanced in FA 2.4 with templating.
How did you import your data?
The schema is slightly different with a table replaced and some fields modified / added / removed. The permissions / roles too will differ.
If you restore a v2.3 backup into the v2.4 installation directly, then make sure login as admin and perform the db upgrade.
And that too only if the v2.3 was devoid of any plugins that may have created additional / modified tables / fields.
The asset_register module that was in v2.3 is now native to v2.4 and hence should not have the module installed in it.
Did you upgrade from 2.3?
Which file did you change and why?
Where did you correct the reference number?
The FrontAccounting Forum has crossed 25000 posts!
Total number of users registered since inception is 41675 but after several prunings we are left with under 6K users and effective posting users are less than half that.
The change to 8 decimal places would affect new transactions only as the computations were done for the old ones using the limited decimal places that existed earlier.
If you keep IDR as the base currency and use USD for specific needs, the standard FA settings would suffice.
@joe: Does this warrant a check? Rounding off errors cannot be that big....
It appears that your session vale for the collation is specifically utf8mb4_unicode_ci which is different from the others.
You can test it in a local XAMPP first and see if the issue persists.
I have no issue with the standard en_US-demo.sql on XAMPP. You too can try the standard en_US demo CoA as a plain vanilla install (not an upgrade) and see if the issue persists. If it goes away, then compare your db schemas to see what gives.
If all else fails, PM me a link to your DB backup sans pwds/txns and the specific build of FA you are using and I will test it out in a sandbox. That way we can check if it is a php script issue or a MySQL db issue.
State the versions of PHP, MySQL, Apache, OS platform.
Posts found: 2,726 to 2,750 of 6,111