1

(15 replies, posted in Reporting)

Experiencing today in rep303.php line 326 when choosing Excel as a destination.
(options is to disable code in printing barcode in rep303.php)
reason behind to have the barcode on is just before to create a unique code without manually entering.
but causing some glitches, as code only accepts 8 digits only, interference with old items code

2

(15 replies, posted in Reporting)

With this, report still open and print barcode for items with correct digit number, others will enough print empty barcode?

3

(15 replies, posted in Reporting)

add code for, so when barcode is not in correct format $arrcode === false, it dont process code below
                        if ($arrcode === false) {
                                #$this->Error('Error in barcode string');
                        } else {

add line 8999 for
                        }


8802,8803c8802,8803
<                               #$this->Error('Error in barcode string');
<                       } else {
---
>                               $this->Error('Error in barcode string');
>                       }
8999d8998
<                       }

4

(15 replies, posted in Reporting)

line 8801 file reporting/include/tcpdf.php, need to disabled this
                        if ($arrcode === false) {
                                #$this->Error('Error in barcode string');
                        }

I thought because my items previous using digit above 8 digits, how to fix this error?
190576261483 N NTB Lenovo Ideapad 110-15lbr/BK (Black) N3060 -> after disable above code, it show
19906652 Milesight Camera CCTV MS-C2962-FPBeach -> show barcode

https://www.dropbox.com/s/zpiokhi7lj97191/Screenshot%202019-09-10%20at%2013.15.32.png?dl=0

5

(15 replies, posted in Reporting)

any clue about this?
experiencing now within FA 2.4.7, PHP 7.2
there is no error in tmp/error.log
please help

kvvaradha wrote:

@bobloblian  - I guess you have FA 2.4.3 or older version, am i right ?

Because in 2.4.4 it works earlier versions, it has the problem with print of barcodes

@Braath Waate
thanks, that is already done by:

+++ b/core/includes/db/connect_db_mysqli.inc
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 define('DB_DUPLICATE_ERROR', 1062);
-define('SQL_MODE', 'STRICT_ALL_TABLES'); // prevents SQL injection with silent field content truncation
+define('SQL_MODE', ''); // well tested

thanks

details problem:

FA 2.4.7
php 7.2
mariadb 10.4.7

screenshot with debug and show sql on
Undefined property: line_item::$qty in file: /PATH/inventory/includes/db/items_adjust_db.inc at line 36
DATABASE ERROR : cannot add journal entry
error code : 1292
error message : Incorrect date value: '' for column `accounting_visimitra`.`46_journal`.`event_date` at row 1
sql that failed was : INSERT INTO 46_journal( `type`,`trans_no`, `amount`, `currency`, `rate`, `reference`, `source_ref`, `tran_date`, `event_date`, `doc_date`) VALUES('0','34','-0.01','IDR','1','VMK-1907-012','','2019-07-31','','')

https://www.dropbox.com/s/o4ujaaf8sq3f8pg/Screenshot%202019-09-03%20at%2015.23.29.png?dl=0

items 725184114885 history is adjust in 30 July with +1 qty
https://www.dropbox.com/s/2wtbjbybc8ok65z/Screenshot%202019-09-03%20at%2015.11.43.png?dl=0

MariaDB [accounting_visimitra]> select * from 46_journal;
+------+----------+------------+----------------------------+------------+------------+------------+----------+--------------------+------+
| type | trans_no | tran_date  | reference                  | source_ref | event_date | doc_date   | currency | amount             | rate |
+------+----------+------------+----------------------------+------------+------------+------------+----------+--------------------+------+
|    0 |        1 | 2019-08-01 | VMK-1908-001               |            | 2019-08-01 | 2019-08-01 | IDR      |                  0 |    1 |
|    0 |        2 | 2019-07-31 | VMK-1907-001               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        3 | 2019-07-31 | VMK-1907-002               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        4 | 2019-07-31 | VMK-1907-003               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        5 | 2019-07-31 | VMK-1907-004               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        6 | 2019-07-31 | VMK-1907-001               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        7 | 2019-07-31 | VMK-1907-003               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        8 | 2019-07-31 | VMK-1907-002               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |        9 | 2019-07-31 | VMK-1907-005               |            | 2019-07-31 | 2019-07-31 | IDR      |        48208712.04 |    1 |
|    0 |       10 | 2019-07-31 | VMK-1907-004               |            | 2019-07-31 | 2019-07-31 | IDR      |       916482350.34 |    1 |
|    0 |       11 | 2019-07-31 | VMK-1907-001               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       12 | 2019-07-31 | VMK-1907-003               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       13 | 2019-07-31 | VMK-1907-001               |            | 2019-07-31 | 2019-07-31 | IDR      |       419723211.71 |    1 |
|    0 |       14 | 2019-07-31 | VMK-1907-003               |            | 2019-07-31 | 2019-07-31 | IDR      |        18261030.49 |    1 |
|    0 |       15 | 2019-07-31 | VMK-1907-002               |            | 2019-07-31 | 2019-07-31 | IDR      |            4093300 |    1 |
|    0 |       16 | 2019-07-31 | VMK-1907-006               |            | 2019-07-31 | 2019-07-31 | IDR      | 504065292.70000005 |    1 |
|    0 |       17 | 2019-07-31 | VMK-1907-001- jurnal balik |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       18 | 2019-07-31 | VMK-1907-007               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       19 | 2019-07-31 | VMK-1907-001- jurnal balik |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       20 | 2019-07-31 | VMK-1907-001- jurnal balik |            | 2019-07-31 | 2019-07-31 | IDR      |            4365000 |    1 |
|    0 |       21 | 2019-07-31 | VMK-1907-008               |            | 2019-07-31 | 2019-07-31 | IDR      |          418928017 |    1 |
|    0 |       22 | 2019-07-31 | VMK-1907-009               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       23 | 2019-07-31 | VMK-1907-009               |            | 2019-07-31 | 2019-07-31 | IDR      |       430771400.17 |    1 |
|    0 |       24 | 2019-07-31 | VMK-1907-010               |            | 2019-07-31 | 2019-07-31 | IDR      |         1355000.62 |    1 |
|    0 |       25 | 2019-07-31 | VMK-1907-011               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       26 | 2019-07-31 | VMK-1907-011               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       27 | 2019-07-31 | VMK-1907-011               |            | 2019-07-31 | 2019-07-31 | IDR      |                  0 |    1 |
|    0 |       28 | 2019-07-31 | VMK-1907-007               |            | 2019-07-31 | 2019-07-31 | IDR      |            4972000 |    1 |
|    0 |       29 | 2019-07-31 | VMK-1907-011               |            | 2019-07-31 | 2019-07-31 | IDR      |      2732964862.66 |    1 |
|    0 |       30 | 2019-08-30 | VMK-1908-001               |            | 2019-08-30 | 2019-08-30 | IDR      |         4277607.91 |    1 |
|    0 |       31 | 2019-08-31 | VMK-1908-002               |            | 2019-08-31 | 2019-08-31 | IDR      |            1488862 |    1 |
|    0 |       32 | 2019-08-31 | VMK-1908-003               |            | 2019-08-31 | 2019-08-31 | IDR      |            3512228 |    1 |
|    0 |       33 | 2019-08-31 | VMK-1908-004               |            | 2019-08-31 | 2019-08-31 | IDR      |            4787799 |    1 |
|   35 |        1 | 2019-08-07 | VMK-1908-001               |            | 2019-08-07 | 2019-08-07 | IDR      |             180000 |    1 |
|   35 |        2 | 2019-08-07 | VMK-1908-002               |            | 2019-08-07 | 2019-08-07 | IDR      |             180000 |    1 |
+------+----------+------------+----------------------------+------------+------------+------------+----------+--------------------+------+
35 rows in set (0.001 sec)

Hi,

how to temporary revert for STRICT_ALL_TABLES to posting transaction, we have problem in the new database and want to have adjustment stok, but experiencing same problem

[03-Sep-2019 16:17:18 Asia/Dili] <b>DATABASE ERROR :</b> cannot add journal entry<br>error code : 1292<br>error message : Incorrect date value: '' for column `accounting_visimitra`.`48_journal`.`event_date` at row 1<br><br><br>

Braath Waate wrote:

Because you are running FA 2.4.7, I'm guessing the issue is a bug that was unmasked by the introduction of STRICT_ALL_TABLES.  In my installation, I am keeping this off until it has been tested for a few years.

+++ b/core/includes/db/connect_db_mysqli.inc
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 define('DB_DUPLICATE_ERROR', 1062);
-define('SQL_MODE', 'STRICT_ALL_TABLES'); // prevents SQL injection with silent field content truncation
+define('SQL_MODE', ''); // well tested

facing this problem, happen in 1 database that have long list item that need to invoicing,
error log only shown:

[16-Jul-2019 15:45:08 Asia/Dili] <b>DATABASE ERROR :</b> cannot add journal entry<br>error code : 1292<br>error message : Incorrect date value: '' for column 'event_date' at row 1<br><br><br>

FA 2.4.7
PHP 7.2

any luck?

ps:
sucess to submit enter invoice, but dont know what happen, also change ini php.ini max_input_vars to raise more than 1000.
and found any suspicious in tmp/error.log
        $debug                  = 1;    // show sql on database errors

        $show_sql               = 1;    // show all sql queries in page footer for debugging purposes
        $go_debug               = 1;    // set to 1 for basic debugging, or 2 to see also backtrace after failure.
        $pdf_debug              = 1;    // display pdf source instead reports for debugging when $go_debug!=0
        // set $sql_trail to 1 only if you want to perform bugtracking sql trail
        // Warning: this produces huge amount of data in sql_trail table.
        // Don't forget switch the option off and flush the table manually after
        // trail, or your future backup files are overloaded with unneeded data.
        //
        $sql_trail              = 1; // save all sql queries in sql_trail

We have transaction as below:
1. Purchase items 1 from Supplier A 2 Unit = @$100
2. Selling items 1 to Cust A  1 Unit = $120
COGS Items 1 is $100

3. Purchase items 1 from Supplier B 1 Unit = @$120
COGS Items 1 is now $110

4. Cust A refund items $120,
GL input as stocks deduct $110, instead $100

as the customer using cogs value before is $100, this should impact for valuation report?

thanks

We have question regarding prepayment to Supplier,

we want to submit this with COA Account "Prepayment Account" and not directly submit to "Account Payable"
transaction details:

Bank Account Payment Entry
1. Pay To Supplier
2. with 11161010 "Prepayment Account"
3. Submit value 10,000,000

Purchase Order
1. Create PO with Supplier A
2. Items with total value 5,000,000
3. Receive items
4. Supplier Invoice

Allocate Supplier Payments or Credit Notes
1. Allocate $500
2. Shown total Left to allocate is correct 5,000,000
* checking with Supplier Balance shown also correct 5,000,000
* checking with GL Inquiry show that

Bank Payment # 1 1 05/15/2019
1501 Uang Muka admin (D) 10,000,000.00
1110 Bank IDR admin (K) 10,000,000.00
Total (D) (K) 10,000,000.00 10,000,000.00

Purchase Order Delivery # 11 05/15/2019
1420 Persediaan - Barang Jadi admin - 67099610 (D) 5,000,000.00
1416 Persediaan - Barang Diterima admin (K) 5,000,000.00
Total (D) (K) 5,000,000.00 5,000,000.00

Supplier Invoice # 1 1 05/15/2019 Supplier 1
2100 Utang Usaha/AP admin (D) 5,000,000.00
1416 Persediaan - Barang Diterima admin (K) 5,000,000.00
Total (D) (K) 5,000,000.00 5,000,000.00


Why is allocation to supplier using Account Payable instead using COA that used when Bank Payment to Supplier?
and how to resolve this? do we need manual journal to correct this?

need advice

Hi @apmuthu,
Yes of course,

but for workaround using compression .sql.gz result lower 1mb something from 7mb plain sql.

Hi @apmuthu,

have edit php.ini time should have 90s for max_input_time, page is show POST with only 7 second after, this number dont show in anywhere.
07/May/2019:01:04:20 to 07/May/2019:01:04:27 +0900

environment
- FA 2.4.6
(check with latest from git also same)
- php 7.2
- centos 7.x

backup database for one of company, that produce for 7mb file sql or .zip or .gz
increase for php value:
max_execution_time = 120
max_input_time = 90
memory_limit = 80M
upload_max_filesize = 80M
post_max_size = 80M

edited:
and upload file, it show error with icon triangle, with no error shown even in debug in config.php

edit php.ini but still no luck, disabled for mod_security but no difference, apache error_log show below:

x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:20 +0900] "GET /fa/admin/backups.php? HTTP/1.1" 200 4756 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:20 +0900] "GET /fa/company/15/js_cache/7/JsHttpRequest.js HTTP/1.1" 304 - "https://domain.com/fa/admin/backups.php?" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:20 +0900] "GET /fa/company/15/js_cache/7/behaviour.js HTTP/1.1" 304 - "https://domain.com/fa/admin/backups.php?" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:20 +0900] "GET /fa/company/15/js_cache/7/utils.js HTTP/1.1" 304 - "https://domain.com/fa/admin/backups.php?" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:20 +0900] "GET /fa/company/15/js_cache/7/inserts.js HTTP/1.1" 304 - "https://domain.com/fa/admin/backups.php?" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
x.x.x.x TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 - lewi [07/May/2019:01:04:27 +0900] "POST /fa/admin/backups.php?JsHttpRequest=15571586703380-form HTTP/1.1" 400 226 "https://domain.com/fa/admin/backups.php?" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"

checking for httpd.conf
#Timeout 90
Timeout 150

but no difference, last time remember that this don't have problem with php 5.6?

main concern is when we submit cost and or purchasing service, it should not costed in COGS if invoice sales not yet posting.

using kit product item with service item and with cogs account changed will considering, but this will create more process for sales person or administration to calculate upfront all the cost related and put in the BOM cost for sales item.
each sales order contain many items that each also may have different delivery cost air and sea, import tax and custom duty cost we have fixed percentage for the country.

for the previous process, need to mention as we use dimension also, so we could use GL Inquiry and filter via dimension for COA Cost Advance, to manually tracking cost and moving to COA Cost of Service.

One question, don't know if this is approriate to handle transaction, look for advice more better solution

We have direct cost for the goods sold is:
- delivery cost
- import tax
- custom and clearance
and for the service we do in eventually for subcontractor for labour for installation,

We want to have costing this for the same like COGS (Cost Of Goods Sold), so it perhaps likely Cost of Service.
if we added item with "Service", and change COGS Account to Advance Cost (new COA with type of Activa), so only shown in Balance Sheet.

Journal will posting (testing posting in FA):

Invoice Supplier :
Cost Advance (D)
Account Payable (K)

Payment to Supplier:
Account Payable (D)
Bank (K)

after invoicing to customer, we will create journal entry to move costing manually:
Cost of Service (kind like COGS for services) (D)
Cost Advance (K)

so the cost will move to Income Statement.

but this way, in our report stock will show correctly, but the problem is that we need manually tracking which item that we need move manualy monthly will depend on posting for invoice tp customer, after all goods and all related service delivered.

checked with 70char, but in the FA 2.4.6 purch_data supplier_description will save 50 first char and it saved

FA 2.4.6
PHP 7.2
Centos 7.x

after apply fix from https://sourceforge.net/p/frontaccounting/activity
receive items cannot proceed, in error.log show
<b>DATABASE ERROR :</b> The supplier purchasing details could not be added<br>error code : 1406<br>error message : Data too long

for column 'supplier_description' at row 1<br><br><br>

checking that var from order line item is come with
table stock_master:
description         | varchar(200)

table purch_data:
supplier_description | char(50)

problem solved if:
ALTER TABLE `38_purch_data` MODIFY COLUMN `supplier_description` VARCHAR(200) DEFAULT NULL;

please advice how to solve, checking with fresh installation 2.4.6 is able to posting "Process Receive Items"
thanks

19

(12 replies, posted in Reporting)

checked with my copies in production, tax report display normally, may you can check new commit in
https://sourceforge.net/p/frontaccounting/activity/?page=0&limit=100#5c3797dde8ba7c15233606bb

Have been using FA quite long, and tried to have report that generated from FA directly for calculating sales commission based on the payment term,

as I'm quite knowing for PHP code, but not quite understand to newly generate report in FA, looking for advice

We want to generate the report as below, required to grab data for the invoice customer and the cogs and cost related to dimensions
No.    Date                    Invoice#    Dimension    Customer    Description   Revenue             COGS             Cost                GP                  GP (in %)    Payment Term     Due Date            Payment            Over Due   
1    8-Jan-2018    137        VXXX        PT. XXX    UPS 650V     1,325,454.55      934,454.56      100,000.00      290,999.99      28.13%    14 days            22-Jan-2018    31-Jan-2018    9 days   

No.    -> reference counter only
Date    -> Invoice date               
Invoice#    -> Invoice no
Dimension    -> We tag dimension for transaction (dimension in item, dimension in supplier invoice, dimension in customer invoice, dimension in bank payment)
Customer    -> Customer name
Description   -> one of items name
Revenue       -> total invoice
COGS       -> total from COGS for the items goods sell     
Costs           -> cost related from "Bank Payment" that we tag through Dimension
GP               -> Profit
GP (in %)       -> Profit %
Payment Term -> Payment term in the customer information    
Due Date          -> Due Date in Customer Invoice 
Payment          -> Payment Date
Over Due         -> show duration for Payment Date - Due Date

with this report (able to export to spreadsheet) we can calculate more flexible in spreadsheet for sales commission percentage depend on the payment date

checking from FA extension this should can be basis report
https://github.com/apmuthu/FA24extensions/tree/master/Extensions/rep_customer_ledger

secondly:
checking with https://github.com/apmuthu/FA24extensions/tree/master/Extensions/pl_dimension
and Report & Analysis, that already can printed Profit Loss Statement with Dimension,
do this can be print dimension more than once, from "Dimension A" to "Dimension Z"

please advice, or this should posting in Jobs wanted/offered, non-free offers, pls give us quote.
thanks

this should works,
add line 810 in pdf_report.inc:
                                if ($this->row < $this->bottomMargin + (15 * $this->lineHeight))
                                        $this->NewPage();

full line will be:
        function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)
        {
                $str = explode("\n", $txt);

                for ($i = 0; $i < count($str); $i++)
                {
                        $l = $str[$i];
                        do
                        {
                                $l = $this->TextWrap($c, $this->row , $width, $l, $align, $border, $fill, $link, $stretch, $spacebreak);
                                $this->row -= $this->lineHeight;
                                if ($this->row < $this->bottomMargin + (15 * $this->lineHeight))
                                        $this->NewPage();
                        }
                        while ($l != '');
                }
        }

FA 2.4.6
PHP 7.2
Centos 7.x

reading: https://frontaccounting.com/punbb/viewtopic.php?id=2932

idea is to have comment larger and get printed in documents
we want to put details for the specification for items in the comments, as the comments will have max char 65,355 this will able break 1 pages (usually do, if we have print documents from excel)

after modification table:
ALTER TABLE `0_comments` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_purch_orders` MODIFY COLUMN `comments` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_sales_orders` MODIFY COLUMN `comments` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_supp_invoice_items` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_stock_master` MODIFY COLUMN `long_description` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_trans_tax_details` MODIFY COLUMN `memo` MEDIUMTEXT DEFAULT NULL;
ALTER TABLE `0_debtor_trans_details` MODIFY COLUMN `description` MEDIUMTEXT DEFAULT NULL;
#ALTER TABLE `0_gl_trans` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;
#ALTER TABLE `0_voided` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;

now comments is larger, but how to fix for the printed report
109 - Print Sales Orders
110 - Print Deliveries - Also handles Packing Lists. | Bin Locations in Packing List
111 - Print Sales Quotations
209 - Print Purchase Orders

for example print PO:
Lines 156 reporting/rep209.php :

                if ($myrow['comments'] != "")
                {
                        $rep->NewLine();
                        $rep->TextColLines(1, 4, $myrow['comments'], -2);
                }

Lines 1092 reporting/includes/pdf_report.inc :
        function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)
        {
                $this->row -= $r;
                $this->TextWrapLines($this->cols[$c], $this->cols[$n] - $this->cols[$c] + $corr, $txt, $this->aligns[$c], $border, $fill, $link, $stretch, true);
        }

        function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)
        {
                $str = explode("\n", $txt);

                for ($i = 0; $i < count($str); $i++)
                {
                        $l = $str[$i];
                        do
                        {
                                $l = $this->TextWrap($c, $this->row , $width, $l, $align, $border, $fill, $link, $stretch, $spacebreak);
                                $this->row -= $this->lineHeight;
                        }
                        while ($l != '');
                }
        }

it this possible to add for NewPage if BottomMargin have reached? just tryout something but cannot get it works
sorry as my PHP skill quite basic, please any assistance will appreciated

23

(10 replies, posted in Report Bugs here)

checked, and try to set  $use_costed_values is set to 0 (before is 1),
not shown the last value in standard_cost 171666.66666667

actually this raise questions:
1. why this line having price 17? 
<code>
1317 |      384 | 8996969010247 |   25 | SUB      | 2017-05-23 |     17 |           |   1 |          225000 |   25 | NULL      |          17 | IDR       |
1495 |      439 | 8996969010247 |   25 | SUB      | 2017-07-11 |     17 |           |  10 | 171666.66666667 |   25 | NULL      |          17 | IDR       |
</code>

as check it item transactions number is IDR (as home currency also)?

24

(10 replies, posted in Report Bugs here)

Hi Joe,

I have troubleshooting rep301.php

function get_domestic_price($myrow, $stock_id)
{
        if ($myrow['type'] == ST_SUPPRECEIVE || $myrow['type'] == ST_SUPPCREDIT)
        {
                #below using standard_cost, change price to standard_cost
                $price = $myrow['price'];
                #$price = $myrow['standard_cost'];
                if ($myrow['person_id'] > 0)
                {
                        // Do we have foreign currency?
                        $supp = get_supplier($myrow['person_id']);
                        $currency = $supp['curr_code'];
                        $ex_rate = get_exchange_rate_to_home_currency($currency, sql2date($myrow['tran_date']));
                        $price /= $ex_rate;
                }
        }
        else
                $price = $myrow['standard_cost']; // Item Adjustments just have the real cost
        return $price;
}

sql query adding for currency type

SELECT move.*, move.type, debtor.curr_code, supplier.supplier_id, supplier.curr_code FROM 23_stock_moves move LEFT JOIN 23_supp_trans credit ON credit.trans_no=move.trans_no AND credit.type=move.type LEFT JOIN 23_grn_batch grn ON grn.id=move.trans_no AND 25=move.type LEFT JOIN 23_suppliers supplier ON IFNULL(grn.supplier_id, credit.supplier_id)=supplier.supplier_id LEFT JOIN 23_debtor_trans cust_trans ON cust_trans.trans_no=move.trans_no AND cust_trans.type=move.type LEFT JOIN 23_debtors_master debtor ON cust_trans.debtor_no=debtor.debtor_no WHERE stock_id=8996969010247;
+----------+----------+---------------+------+----------+------------+--------+-----------+-----+-----------------+------+-----------+-------------+-----------+
| trans_id | trans_no | stock_id      | type | loc_code | tran_date  | price  | reference | qty | standard_cost   | type | curr_code | supplier_id | curr_code |
+----------+----------+---------------+------+----------+------------+--------+-----------+-----+-----------------+------+-----------+-------------+-----------+
|      287 |       63 | 8996969010247 |   25 | SUB      | 2016-10-11 | 260000 |           |  10 |          260000 |   25 | NULL      |          17 | IDR       |
|      317 |        2 | 8996969010247 |   17 | SUB      | 2016-10-10 |      0 | 2         |   5 |          380000 |   17 | NULL      |        NULL | NULL      |
|      328 |       61 | 8996969010247 |   13 | SUB      | 2016-10-18 | 315000 | auto      | -10 |          300000 |   13 | IDR       |        NULL | NULL      |
|      765 |      191 | 8996969010247 |   25 | SUB      | 2017-01-23 | 210000 |           |  10 |          240000 |   25 | NULL      |          17 | IDR       |
|      774 |      135 | 8996969010247 |   13 | SUB      | 2017-01-31 | 215250 | auto      | -10 |          240000 |   13 | IDR       |        NULL | NULL      |
|     1317 |      384 | 8996969010247 |   25 | SUB      | 2017-05-23 |     17 |           |   1 |          225000 |   25 | NULL      |          17 | IDR       |
|     1334 |      245 | 8996969010247 |   13 | SUB      | 2017-05-26 | 153750 | auto      |  -1 |          225000 |   13 | IDR       |        NULL | NULL      |
|     1495 |      439 | 8996969010247 |   25 | SUB      | 2017-07-11 |     17 |           |  10 | 171666.66666667 |   25 | NULL      |          17 | IDR       |
|     1520 |      284 | 8996969010247 |   13 | SUB      | 2017-07-20 | 148625 | auto      | -10 | 171666.66666667 |   13 | IDR       |        NULL | NULL      |
+----------+----------+---------------+------+----------+------------+--------+-----------+-----+-----------------+------+-----------+-------------+-----------+
9 rows in set, 219 warnings (0.01 sec)

as in the line 4th, the result for

$price = get_domestic_price($row, $stock_id);
return $price

it show 210000, as it is strange as the currency still in IDR, it should 240000, debugging it catch by

        if ($myrow['type'] == ST_SUPPRECEIVE || $myrow['type'] == ST_SUPPCREDIT)

but as this home currency, the price shown in line 36

$price = $myrow['price'];

questions why line 4 is calculate as different currency?

25

(10 replies, posted in Report Bugs here)

found same problem in FA 2.4.4
step to reproduce
1. add item a with purchase value 1.8million idr(po,inv, price calculate before tax)
FA show correct qty 1 with correct standard price
2. sell items as we have input wrong selling price, a price 13million (so, invoice)
3. credit this from the invoice pages
FA show correct qty as item refund,
qty show 1 price 13million
standard price correct (in the item status)
4. Inventory valuation report show
Qty in 2 out 1
Value -5.6million

It should show valuation price 1.8 million, how we can fix this as in the items status show no any value minus 5.6million.