I am surprised. No one in FA Community facing the problem of reference increment ![]()
401 07/19/2018 07:34:03 pm
Re: Transaction References : The value is not incremented (10 replies, posted in Setup)
402 07/17/2018 11:48:36 am
Re: Transaction References : The value is not incremented (10 replies, posted in Setup)
could anyone test this?
403 07/13/2018 07:30:49 am
Re: Editable Item Description's Input is TextBox. How to Enable TextArea (13 replies, posted in FA Modifications)
I have set the cols='35' and rows='3' and now its OK for me
404 07/13/2018 07:07:11 am
Re: Editable Item Description's Input is TextBox. How to Enable TextArea (13 replies, posted in FA Modifications)
I have tested the recommended code of @kvvaradha. It is working fine and data is correctly displayed even in reports. The only problem mentioned in this screen short
The TextArea is encompassing the second column
405 07/12/2018 12:40:35 pm
Topic: Editable Item Description's Input is TextBox. How to Enable TextArea (13 replies, posted in FA Modifications)
The following function returns a TextBox to Edit Item Description if Item is Editable. Some Item Descriptions needs to be multi lines. How can this function returns TextArea for Editable Items.
function sales_items_list_cells($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false, $editkey=false)
{
if ($editkey)
set_editor('item', $name, $editkey);
if ($label != null)
echo "<td>$label</td>\n";
echo sales_items_list($name, $selected_id, $all_option, $submit_on_change,
'', array('cells'=>true));
}406 07/11/2018 07:06:31 am
Re: Adding Column Value in Drop Down (3 replies, posted in FA Modifications)
Can't we use both? i.description and s.long_description?
407 07/11/2018 03:03:50 am
Topic: Adding Column Value in Drop Down (3 replies, posted in FA Modifications)
I want to add another column in Drop Down List in following function i.e. s.long_description. What changes shall I make
function sales_items_list($name, $selected_id=null, $all_option=false,
$submit_on_change=false, $type='', $opts=array())
{
// all sales codes
$sql = "SELECT i.item_code, i.description, c.description, count(*)>1 as kit,
i.inactive, if(count(*)>1, '0', s.editable) as editable
FROM
".TB_PREF."stock_master s,
".TB_PREF."item_codes i
LEFT JOIN
".TB_PREF."stock_category c
ON i.category_id=c.category_id
WHERE i.stock_id=s.stock_id
AND mb_flag != 'F'";
if ($type == 'local') { // exclude foreign codes
$sql .= " AND !i.is_foreign";
} elseif ($type == 'kits') { // sales kits
$sql .= " AND !i.is_foreign AND i.item_code!=i.stock_id";
}
$sql .= " AND !i.inactive AND !s.inactive AND !s.no_sale";
$sql .= " GROUP BY i.item_code";
return combo_input($name, $selected_id, $sql, 'i.item_code', 'c.description',
array_merge(
array(
'format' => '_format_stock_items',
'spec_option' => $all_option===true ? _("All Items") : $all_option,
'spec_id' => ALL_TEXT,
'search_box' => true,
'search' => array("i.item_code", "c.description", "i.description"),
'search_submit' => get_company_pref('no_item_list')!=0,
'size'=>15,
'select_submit'=> $submit_on_change,
'category' => 2,
'order' => array('c.description','i.item_code'),
'editable' => 30,
'max' => 255
), $opts), $type == 'kits' ? $type : "stock_sales" );
}408 07/08/2018 04:32:59 am
Re: Transaction References : The value is not incremented (10 replies, posted in Setup)
I have tried one solution. I request you to please analyze it critically
Modified the below function in includes/references.inc
at Line 228
function is_new_reference(&$ref, $type, $trans_no=0) //modified by faisal
{
$old_ref = $ref;
while ($this->_get($type,$trans_no,$ref))
{
$ref = $this->_increment($ref);
}
if ($old_ref!=$ref)
$this->reflines->save_next($type,$ref);
return !$this->_get($type, $trans_no, $ref);
}At Line 428
function is_new_reference(&$ref, $type, $trans_no=0)//Modified by faisal
{
global $Refs;
$old_ref = $ref;
while (!$Refs->is_new_reference($ref,$type,$trans_no))
{
$ref = $Refs->_increment($ref);
}
if ($old_ref!=$ref)
$Refs->reflines->save_next($type,$ref);
return $Refs->is_new_reference($ref, $type, $trans_no);
}includes/data_checks.inc at Line 666
function check_reference(&$reference, $trans_type, $trans_no=0, $context=null, $line=null)409 07/07/2018 03:02:44 pm
Re: Transaction References : The value is not incremented (10 replies, posted in Setup)
the code for it has been placed in the forum and possibly in the wiki adn the end user can make a choice.
@apmuthu can you refer the wiki or post where this code is available for this solution.
410 07/07/2018 02:16:50 pm
Re: Date and Time in Date_row (8 replies, posted in FA Modifications)
Quite difficult for me to edit Javascript ![]()
411 07/06/2018 06:51:00 pm
Topic: Transaction References : The value is not incremented (10 replies, posted in Setup)
This topic has been discussed in various posts but now I want to discuss a different scope.
Any Transaction form picks the value of next reference from Transaction References table and Upon new record creation it sets the next reference in Transaction References table.
This process is very natural but sometimes, not always but rarely the value doesn't increment in Transaction References. The User see the message "The reference is already in use " . Then the user has to manually increment the value in Transaction References.
I could not find the reason why the increment stucks but it is not always like this.
What could be the fix for this problem?
412 07/06/2018 06:12:11 pm
Re: Access setup: Edit one's own transactions (6 replies, posted in Setup)
@davidkumi, you need to change the core as below
Paste the code below at Line 660 in includes\datachecks.inc
if (!$_SESSION['wa_current_user']->can_access('SA_EDITOWNRSTRANS'))
{
$audit = get_audit_trail_last($trans_type, $trans_no);
if ($_SESSION['wa_current_user']->user == $audit['user'])
{
if (!$msg)
$msg = '<b>'._("You have no edit access to transactions created by YOURSELF.").'</b>';
display_note($msg);
display_footer_exit();
}
}Add the code below at Line 131 in includes/access_levels.inc
'SA_EDITOWNTRANS' => array(SS_SPEC|7, _("Edit Own transactions")), Hope this works
413 07/06/2018 02:30:20 am
Re: Date and Time in Date_row (8 replies, posted in FA Modifications)
Yes, I want to input time manually. What could be the changes?
414 07/05/2018 11:40:42 pm
Re: Date and Time in Date_row (8 replies, posted in FA Modifications)
I tried changing the datatype of the field from date -> datetime in mysql. It gives me two options (ON UPDATE) AND (CURRENT TIMESTAMP). I tried both cases
After changing this data type the behaviour of FA remains unchanged while the value being stored at database is like this
2018-07-04 00:00:00
No input is taken from FA for the Time.
415 07/05/2018 05:20:14 pm
Topic: Date and Time in Date_row (8 replies, posted in FA Modifications)
Using Date_row function with date picker can we input both Date and Time?
416 07/03/2018 08:11:55 am
Re: Adding Item Category Filter to the core (5 replies, posted in Setup)
Yes this is Necessary. We shall add this in the Core
417 06/28/2018 02:07:11 am
Topic: Can We Connect FA to remote Database (3 replies, posted in Setup)
Is it possible to connect FA to remote Database? I have many companies on my installation but I want only 2 companies to connect to remote database. Is it possible?
418 06/25/2018 11:02:18 am
Re: REST API (86 replies, posted in Modules Add-on's)
I want to Add New Customer and then Record its Sales Order using API from an external website. On my installation multiple companies are running but this feature is needed only for one Company. How can I do this?
419 06/16/2018 06:43:34 am
Re: FA with Batch/Serial/Lot Number Tracking System (19 replies, posted in FA Modifications)
How much?
420 06/14/2018 05:49:25 pm
Re: FA with Batch/Serial/Lot Number Tracking System (19 replies, posted in FA Modifications)
Greate @kvvaradha.
Is this going to be commercial or open source?
421 06/09/2018 06:04:42 pm
Re: Account Code to be define as int (4 replies, posted in Banking and General Ledger)
@poncho1234
Stack Over Flow natsort() solution worked like a charm. Thanks A Lot.
422 06/09/2018 07:48:39 am
Re: FA with Batch/Serial/Lot Number Tracking System (19 replies, posted in FA Modifications)
@kvvaradha, the automatic calculation of average cost of the product will be done as a whole or batch wise? I mean will there be only one Avg Cost of the product irrespective of batch or Each batch will have its own Avg Cost?
423 06/09/2018 07:45:00 am
Re: Account Code to be define as int (4 replies, posted in Banking and General Ledger)
Thanks @Joe,
Yes I understand, but Actually I needed a customization to automatically pick the Next Available Account Code for the Given Account Type. It worked Fine till Code 2899 but when it reaches 28100 it is not picking the next value 28101 because the order sequence of Varchar says 28100 is smaller than 2899.
Converting it to INT is working fine but I fear it may cause anomalies. Any Ideas?
424 06/08/2018 06:54:43 pm
Re: FA with Batch/Serial/Lot Number Tracking System (19 replies, posted in FA Modifications)
http://fa.kvcodes.com/batch/inventory/adjustments.php?NewAdjustment=1
The above link is not working. I wanted to check how adjustment takes care of Batch No.
Rest What I have analyzed is that Batch number will be introduced to the System at the time of Purchases.
It is a very good and useful feature.
425 06/08/2018 06:30:44 pm
Topic: Account Code to be define as int (4 replies, posted in Banking and General Ledger)
In chart_master table if I change the data type of account_code field from Varchar to int, will it cause any anomaly in relationships with other tables?
I have kept all Account Codes as Integer
