Hi, actually i created a custom table and add some fields, which are necessary to bring to the login page. but the problem is when use the following functions it will return the proper result on some other page. but the same query does not work on login.php page.

Can you help me to identify the problem in the query using in login page...

$sql="SELECT * FROM ".TB_PREF."kv_sys_prefs LIMIT 1";
    
    $result = db_query($sql, "could not Process");
   
    $kv_week_day_details = db_fetch($result);
   
    echo json_encode($kv_week_day_details);

i tried, but it saves html characters not the double quotes.

There is the problem persist in the Session management. You may changed the login timeout and which leads to save the session details there. When you try to access again,. it will generate error.

Hi,

Here i am developing a hrm module for FA. in the middle, i have the problem of saving json encoded data. Here is my code,

$kv_sal_structure = array(
        'empl_hra' => (empty($_POST['empl_hra'])) ? '0' : $_POST['empl_hra'],
        'empl_ca' => (empty($_POST['empl_ca'])) ? '0' : $_POST['empl_ca'],
        'empl_fa' => (empty($_POST['empl_fa'])) ? '0' : $_POST['empl_fa'],
        'empl_ma' => (empty($_POST['empl_ma'])) ? '0' : $_POST['empl_ma'],
        'empl_ea' => (empty($_POST['empl_ea'])) ? '0' : $_POST['empl_ea'],
        'empl_sa' => (empty($_POST['empl_sa'])) ? '0' : $_POST['empl_sa'],
        'empl_lta'     => (empty($_POST['empl_lta'])) ? '0' : $_POST['empl_lta'],
        'empl_pt' => (empty($_POST['empl_pt'])) ? '0' : $_POST['empl_pt'],
        'empl_gi' => (empty($_POST['empl_gi'])) ? '0' : $_POST['empl_gi'],
        'empl_pf' => (empty($_POST['empl_pf'])) ? '0' : $_POST['empl_pf'],
        'empl_esi' => (empty($_POST['empl_esi'])) ? '0' : $_POST['empl_esi'],
        'empl_l_a' => (empty($_POST['empl_l_a'])) ? '0' : $_POST['empl_l_a'],
        'empl_it' => (empty($_POST['empl_it'])) ? '0' : $_POST['empl_it']);
    $sal_structure =json_encode($kv_sal_structure);

Here i got check box vaules and make it as array and processed as array, than i tried to save it on database, but while saving into the database, it looks like the following structue.


html "&quote " instead of double quotes.

How can i save the data like


{"empl_hra":"1","empl_ca":"1","empl_fa":"0","empl_ma":"0","empl_ea":"0","empl_sa":"0","empl_lta":"0","empl_pt":"0","empl_gi":"0","empl_pf":"0","empl_esi":"0","empl_l_a":"0","empl_it":"0"}

Help me to solve it.

There is no problem in Fa actually, just clear your browser cookies and try login again, it will work for you. It seems the Browser issue.

1,131

(2 replies, posted in FA Modifications)

Read here for a simple tutorial to create new top menu item .

http://www.kvcodes.com/2014/01/create-new-menu-item-in-frontaccounting/

1,132

(2 replies, posted in Setup)

Here i wrote an simple article for new  menu creation.

http://www.kvcodes.com/2014/01/create-new-menu-item-in-frontaccounting/

Yes, I agree with your opinion.  So, here I changed it as per my view,

<pre>
//-----------------------------------------------------------------------------------
function file_cells($label, $name, $id="", $file_type=null)
{
    if ($id != "")
        $id = "id='$id'";
        echo $file_type ;
    if($file_type== 'documents' ){
        $accept = '.doc,.docx, .rtf, .txt, .pdf, .ppt, .pptx' ;
    } elseif($file_type== 'image' ){
        $accept = 'image/*' ;
    } elseif( $file_type='video') {
        $accept ='video/*' ;
    } else
        $accept = '';
       
    label_cells($label, "<input type='file' name='$name' $id  accept='$accept' $file_type />");
}       
function file_row($label, $name, $id = "", $file_type=null)
{
    echo "<tr><td class='label'>$label</td>";
    file_cells(null, $name, $id, $file_type);
    echo "</tr>\n";
}   
</pre>

Here, you can input 4th parameter as the acceptable file type, and my code, i used three different things,

documents - doc, docx, rtf, txt, pdf, ppt, pptx,

image -  all image types, which supported by html 5

video - all video file types, which supported by HTML5.

and final one is empty, Thats one for default use, it will support all file types,

here, i just changed it based on my convinent for the attachements, while uploading images of a product, we dont need to allow peoples to choose, some other file types, such as doc's and exe's.
in certain case its become vulnerable to our FA. So we should avoid choosing different file types, before selecting it.  Eventhough we can check it while processing form submission. but this one avoids attaching some other files type, here i changed the file_row() based on images , pdf, and doc, just try these functions,

//-----------------------------------------------------------------------------------
function kv_image_cells($label, $name, $id="")
{
    if ($id != "")
        $id = "id='$id'";
    label_cells($label, "<input type='file' name='$name' $id  accept='image/*'/>");
}       
function kv_image_row($label, $name, $id = "")
{
    echo "<tr><td class='label'>$label</td>";
    kv_image_cells(null, $name, $id);
    echo "</tr>\n";
}   


//-----------------------------------------------------------------------------------
function kv_doc_cells($label, $name, $id="")
{
    if ($id != "")
        $id = "id='$id'";
    label_cells($label, "<input type='file' name='$name' $id  accept='.doc,.docx'/>");
}       
function kv_doc_row($label, $name, $id = "")
{
    echo "<tr><td class='label'>$label</td>";
    kv_doc_cells(null, $name, $id);
    echo "</tr>\n";
}   

//-----------------------------------------------------------------------------------
function kv_pdf_cells($label, $name, $id="")
{
    if ($id != "")
        $id = "id='$id'";
    label_cells($label, "<input type='file' name='$name' $id  accept='.pdf'/>");
}       
function kv_pdf_row($label, $name, $id = "")
{
    echo "<tr><td class='label'>$label</td>";
    kv_pdf_cells(null, $name, $id);
    echo "</tr>\n";
}

if you upgrade FA. Just take a copy of existing one. Also remember, there are updates with codes and database tables. So it will affect your existing data surely. better get an expert to do this all.

hi joe,

i tried to customize the csutomer profile by adding few items, everything works fine except the profile image of the customer. Actually, it create js error

here is the line of code i used.

file_row(_("Image File (.jpg)") . ":", 'pic', 'pic');    

and js error is

Uncaught Error: JsHttpRequest: Cannot find a loader which may process the request. Notices are:
- XML: Cannot use XMLHttpRequest loader: direct form elements using and uploading are not implemented
- SCRIPT: Cannot use SCRIPT loader: it supports on...<omitted>...n. JsHttpRequest.js:56
JsHttpRequest.t._error JsHttpRequest.js:56
JsHttpRequest.t.send JsHttpRequest.js:41
JsHttpRequest.query JsHttpRequest.js:86
JsHttpRequest._request utils.js:15
JsHttpRequest.request utils.js:6
_set_combo_select.e.onchange

and when i remove this line

file_row() everything works fine.

1,137

(1 replies, posted in Setup)

The problem persist, when you copy the exisitng installaitons,  So just place a free copy of the Fa 2.3.19 into it. Than the problem will be solved,


Also, if you are interested take a look at here for  my theme

project.kvcodes.com/2321/

username : kvdemo

password: theme_demo

Hi , Here is my another theme. Test the demo and if you like the theme contact me.

http://project.kvcodes.com/2321/

username: kvdemo

password: theme_demo. smile

I am also the FA developer. Give me your customization requirements. Let me do it.

Hi Rida,

I can do the Editing work on sales module, contact me for better customizations..

1,141

(4 replies, posted in Setup)

There is a problem in your php library,

it doesnot enabled  Zlib.  use phpinfo().

to whether the library is enabled or not.

There is no problem with your Ubuntu. Dont worry about this small issue.

with Cheers,

Kvvaradha
(admin of Kvcodes.com).

if you are interested, test my custom theme for frontaccounting here.

http://www.kvcodes.com/2014/01/front-accounting-theme-kv-varadha/

hi everybody,

     I am happy to announce that i just developed a theme for frontaccounting. Those who are really interested to try this theme download it from here.

Kvvaradha.

Also dont forgot to provide your feedback as a comment there. Also suggest me to improve my works..


With Hopefully,

Kvvaradha

(admin of Kvcodes.com)

1,143

(40 replies, posted in Report Bugs here)

can it possible to get Exchange rates automatically for every year data. Even the past years currnecy conversion value too.


Thanks in advance.