Great.....
176 11/12/2019 09:03:22 am
Re: Approval System for GL Postings Demo and SourceCode (30 replies, posted in FA Modifications)
177 11/12/2019 05:44:41 am
Re: Problem in Customer Balances (2 replies, posted in Accounts Receivable)
Thief of the ledger has been caught
See this image https://prnt.sc/pvpkcu
Payment received against Prepaid Sales Order. Invoice not made so and hence not reflected in Customer Balances.
178 11/12/2019 05:41:58 am
Re: Income & Statement (1 replies, posted in Manufactoring)
Hello @Marxist,
This sort of Income Statment is Valid when the Inventory Costing method is either FIFO or LIFO.
Since FA uses Average Costing so it is not applicable in FA.
In order to get it done it may require some core changes and lot of customizations
Regards.
179 11/12/2019 05:19:06 am
Re: big problem ( bug in system ) (1 replies, posted in Banking and General Ledger)
@Mahmoud
It depends on lot of factors.
1. Whether or not you have allowed Negative Inventory in your system
2. Secondly FA calculates Avg Cost of the items when they are Received and sometimes whey they are Stocked out. That Avg Cost is saved as the Standard Cost for that item in FA. Inventory Valuation Report actually picks that Cost for Valuation.
3. Now the way that Avg Cost is calculated in FA needs to be understood. I have tried to explain this in this ARTICLE
4. There has been a lot of discussion on this topic on Forum and we are expecting some Bug Fixes in upcoming 2.5.
5. By that time if you can also share your experiences following the article above that how right or wrong you found FA to affect average cost then it will help the community.
6. There is one more way that affects Average Cost not discussed in this article because I have disabled that in PakERP. That is Location Transfers.
Hope this helps you to find more bugs and share with community and enable you to give better suggestions.
Good Luck.
180 11/12/2019 02:11:09 am
Re: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
No I have that code and it works fine for GET commands.
I didn't had any problem in reading the $content returned from the curl request, at all.
I had problem in sending the POST request using curl.
That is addressed by http_build_query($data); line.
In Wiki I suggest change the code as below for facurlrest.php
Contents of facurlrest.php file:
<?php
// FrontAccounting Bridge REST Test Script
// Author: Ap.Muthu
// Website: www.apmuthu.com
// Release Date: 2012-11-28
include_once "fabridge.php";
$method = isset($_GET['m']) ? $_GET['m'] : 'g'; // g, p, t, d => GET, POST, PUT, DELETE
$action = isset($_GET['a']) ? $_GET['a'] : '';
$record = isset($_GET['r']) ? $_GET['r'] : '';
$filter = isset($_GET['f']) ? $_GET['f'] : false;
// Sample Data for POST
$data = array(
'firstName'=> 'John',
'lastName'=> 'Doe'
);
$data = http_build_query($data);
$output = fa_bridge($method, $action, $record, $filter, $data);
echo print_r($output, true);
?>
181 11/11/2019 04:40:03 pm
Re: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
@apmuthu, I was right. The problem was not of PHP.
This Post helped me. STACK OVERFLOW
now facurlrest.php looks like below
<?php
// FrontAccounting Bridge REST Test Script
// Author: Ap.Muthu
// Website: www.apmuthu.com
// Release Date: 2012-11-28
include_once "fabridge.php";
$method = isset($_GET['m']) ? $_GET['m'] : 'g'; // g, p, t, d => GET, POST, PUT, DELETE
$action = isset($_GET['a']) ? $_GET['a'] : '';
$record = isset($_GET['r']) ? $_GET['r'] : '';
$filter = isset($_GET['f']) ? $_GET['f'] : false;
$data = array(
'trans_type' => '10',
'ref'=> 'NoGuia0001',
'customer_id'=> '78',
'branch_id'=> '78',
'location'=> 'DEF',
'deliver_to'=> 'ABC, S.A. DE C.V.',
'delivery_date'=> '09/11/2019',
'delivery_address'=> 'Karachi',
'order_date'=> '09/11/2019',
'phone'=> '',
'cust_ref'=> '',
'comments'=> '',
'ship_via'=> '1',
'payment'=> '1',
'sales_type'=> '1',
'items'=> array
(
0 => array
(
'stock_id'=> '2801',
'description'=> 'iPhone',
'qty'=> '1',
'price'=> '100',
'discount'=> '0'
),
1 => array
(
'stock_id'=> '2802',
'description'=> 'Samsung',
'qty'=> '1',
'price'=> '100',
'discount'=> '0'
),
),
);
$data = http_build_query($data);
$output = fa_bridge($method, $action, $record, $filter, $data);
?>
182 11/11/2019 01:57:02 pm
Re: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
Ok, one more thing.
The current core api module doesn't have the line of code to decode as below.
json_decode($info, true);
So is it assumed that the POST data being sent through api is already decoded by the time it reaches at this point
function sales_add()
{
$app = \Slim\Slim::getInstance('SASYS');
$req = $app->request();
$info = $req->post();
Or something is missed here?
Because without converting the JSON data into PHP Array we can't add it to cart.
183 11/11/2019 01:37:13 pm
Re: Problem in stock_movements.php Inquiry (2 replies, posted in Report Bugs here)
Ok, I have created a fresh invoice and the Credited it. It is showing single entry. I have to look into the specific transaction in detail.
184 11/11/2019 01:32:01 pm
Re: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
I am using PHP Version 5.6.40 on CentOs Linux Cloud.
But I think this is not related to PHP version. Have you given the above output after sending the $data through curl request in API?
In my first post I have shown two outputs of same data.
First one is read at the receiving server of API call. (Not JSON optimized)
Second one is at the Send Server before API call. (JSON optimized)
So If the PHP version is causing the issue then both outputs shall be same.
In my case sending and receiving servers are same server with two different directories.
Can you please retest it with the API Call?
185 11/11/2019 12:37:05 pm
Re: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
Ok Thanks for pointing this out. But problem doesn't lie here.
Even If I pass following simplest data as given in wiki
$data = json_encode(array(
'firstName'=> 'John',
'lastName'=> 'Doe'
));
$output = fa_bridge($method, $action, $record, $filter, $data);
It is parsed in api/sales.inc as below
function sales_add()
{
$app = \Slim\Slim::getInstance('SASYS');
$req = $app->request();
$info = $req->post();
The variable $info is read as below
Array
(
[{"firstName":"John","lastName":"Doe"}] =>
)
While it shall be parsed as below
{"firstName":"John","lastName":"Doe"}
Please Check this https://prnt.sc/pvdi0b
186 11/11/2019 12:11:44 pm
Topic: Problem in stock_movements.php Inquiry (2 replies, posted in Report Bugs here)
Hello,
When a Credit Note is Entered, In inventory/inquiry/stock_movements.php each line is repeated two times as shown in image below.
187 11/11/2019 08:19:00 am
Re: Approval System for GL Postings Demo and SourceCode (30 replies, posted in FA Modifications)
@joe my vote for it, please consider.
188 11/11/2019 08:14:59 am
Topic: Creating Invoice through REST API (14 replies, posted in Accounts Receivable)
Using the Latest API module (modified by @ApMuthu) and guidance given in Wiki I modified the following file
facurlrest.php
<?php
// FrontAccounting Bridge REST Test Script
// Author: Ap.Muthu
// Website: www.apmuthu.com
// Release Date: 2012-11-28
include_once "fabridge.php";
$method = isset($_GET['m']) ? $_GET['m'] : 'g'; // g, p, t, d => GET, POST, PUT, DELETE
$action = isset($_GET['a']) ? $_GET['a'] : '';
$record = isset($_GET['r']) ? $_GET['r'] : '';
$filter = isset($_GET['f']) ? $_GET['f'] : false;
$data = json_encode(array(
'trans_type' => '10',
'ref'=> 'NoGuia0001',
'customer_id'=> '78',
'branch_id'=> '78',
'location'=> 'DEF',
'deliver_to'=> 'ABC, S.A. DE C.V.',
'delivery_date'=> '2019/11/09',
'delivery_address'=> 'Karachi',
'order_date'=> '09/11/2019',
'phone'=> '',
'cust_ref'=> '',
'comments'=> '',
'ship_via'=> '1',
'payment'=> '1',
'sales_type'=> '1',
'items'=> array
(
0 => array
(
'stock_id'=> '2801',
'description'=> 'iPhone',
'qty'=> '1',
'price'=> '100',
'discount'=> '0'
),
0 => array
(
'stock_id'=> '2802',
'description'=> 'Samsung',
'qty'=> '1',
'price'=> '100',
'discount'=> '0'
),
),
));
$output = fa_bridge($method, $action, $record, $filter, $data);
?>
The $data is being read at modules/api/sales.inc at Line: 256 as below
Array
(
[{"trans_type":"10","ref":"NoGuia0001","customer_id":"78","branch_id":"78","location":"DEF","deliver_to":"ABC,_S_A__DE_C_V_","delivery_date":"2019\/11\/09","delivery_address":"Karachi","order_date":"09\/11\/2019","phone":"","cust_ref":"","comments":"","ship_via":"1","payment":"1","sales_type":"1","items":] => Array
(
[{"stock_id":"2802","description":"Samsung","qty":"1","price":"100","discount":"0"}] =>
)
)
While the Correct JSON Presentation of this Data shall be
{"trans_type":"10","ref":"NoGuia0001","customer_id":"78","branch_id":"78","location":"DEF","deliver_to":"ABC, S.A. DE C.V.","delivery_date":"2019\/11\/09","delivery_address":"Karachi","order_date":"09\/11\/2019","phone":"","cust_ref":"","comments":"","ship_via":"1","payment":"1","sales_type":"1",
"items":[{"stock_id":"2802","description":"Samsung","qty":"1","price":"100","discount":"0"}]}
How to handle this?
Due to wrong presentation of JSON Data I am not able to apply json_decode($data, true).
However, I have tested the api successfully by manually putting the correct presentation of this data on modules/api/sales.inc
Regards.
189 11/01/2019 07:55:08 am
Topic: Problem in Customer Balances (2 replies, posted in Accounts Receivable)
One of my client has reported this problem. Here is the ledger of his Walk In Customer.
All Transactions are being shown Knocked Off, But the total of Charges and Debits gives a difference of -36000.
Since this is Walk in Customer so Payment is settled then and there and the same is being reflected that Not a Single Transaction in itself has a balance.
But How shall I interpret this -36000?
Even the Customer Transaction Inquiry is showing the Balance of -36,000
If I see this report with Show Balance = Yes then it gives the Ending Balance of -36,000.
The client says there is no Dues or Extra Payments from this customer as all Individual Transactions are being Knocked Off.
The ledger is complete from the Day1 till date.
190 10/19/2019 03:20:14 am
Re: Standard Cost Changes and as such result to Negative Profit in Report (28 replies, posted in Items and Inventory)
Hello @popsicles12
It is very important to know for all of us that why and when the standard cost of an item changes. FA tries to keep the weighted average of the material cost so that the Inventory Valuation reflecting in Trial Balance shall be same as that of in the Inventory Valuation Report.
FA does this by calling update_average_material_cost function from 5 different places in FA.
1. When a Stock Movement is Voided. Even if Location Transfer is Voided. (As per my understanding on Location Transfer Void this function shall not be called because Location Transfer doesn't affect the overall cost of the Item in FA)
2. When Stock Adjustment is Done either positive or negative if the Cost of Adjustment is manually changed to differ from the existing standard cost.
3. When the GRN of Item is recorded.
4. When a Purchased Item is Returned to Supplier
5. When the Direct Supplier Invoice is Recorded.
You can search the said function in FA to find out its location.
You can create a New instance of FA and do random operations to find out the change in Standard Cost and Log it to find out the behaviour of FA.
Q#3: You can do manual feeding of Standard Cost if you totally disable the call of this function in FA.
please go through this post https://frontaccounting.com/punbb/viewtopic.php?id=8157
You can also go through this post https://frontaccounting.com/punbb/viewtopic.php?id=8184
You can go through this post https://frontaccounting.com/punbb/viewtopic.php?id=8238
These problems were discussed in detail earlier.
We are hoping that in FA 2.5 these problems will be handled properly.
191 10/13/2019 03:16:42 am
Re: TAX 5.0% not calculate correctly and not shows under n after subtotal (4 replies, posted in Accounts Receivable)
Change the Price List to Wholesale on this document and then add Line items
192 10/04/2019 02:26:04 pm
Re: erorr report (15 replies, posted in Reporting)
@joe, @barbarian has already done some work available in github for upgrading reporting folder with latest TCPDF. You can check that
https://frontaccounting.com/punbb/viewtopic.php?id=8216
193 10/04/2019 02:19:28 pm
Re: Check entered data and save document (12 replies, posted in Accounts Receivable)
The problem is that when same window is opened at two different computers then the next available reference is picked by the system which is same for both users.
Whoever lucky to process earlier will be through but later will see this message due to same reference usage.
In order to overcome this you need to do some changes is core references.inc
The function is_new_reference() shall be customized to return the newest reference irrespective of reference number on the form being picked by system
194 09/28/2019 03:18:21 am
Re: Email not working in FA (8 replies, posted in Report Bugs here)
Try using this module FA SMTP Mailer
195 09/24/2019 10:44:47 am
Re: Purchase order/Direct GRN (5 replies, posted in FA Modifications)
@naeem you may need to edit purchasing/includes/ui/po_ui.inc and grn_ui.inc and some other core files to get it working.
196 09/24/2019 06:31:21 am
Re: how to generate statement of financial position report (9 replies, posted in Banking and General Ledger)
@joe, which module. I couldn't locate
197 09/24/2019 06:24:00 am
Re: Report Customer balance (1 replies, posted in Reporting)
Actually dimension is not mandatory in all transactions that hit customer balances. specially Customer Payments has no option of Dimensions selection.
So I think your desired report needs alot of changes in the core.
198 09/23/2019 12:29:43 pm
Re: Option to retain PDF files in /company/x/pdf_files folder (2 replies, posted in Reporting)
Thanks, got it
199 09/23/2019 03:35:35 am
Topic: Option to retain PDF files in /company/x/pdf_files folder (2 replies, posted in Reporting)
Hello,
Can anyone help me to know the option to control the retention of PDF reports in company/x/pdf_files folder. I can see that such report files are removed after sometimes. Which option is controlling this?
200 09/22/2019 02:32:03 pm
Re: Pakistan Sales Tax regime (21 replies, posted in Wish List)
Thanks my pleasure. Looking forward to your findings