yes, needs to create two tables, but those are all created automatically, while running these functions

1,127

(2 replies, posted in Setup)

You have to do it manually, because, the pdf generation option is random one, it just displays the files, once you make chnages and try to reprint again, it will be generated new one by replacing the previous pdf file. 

So, you need to get it separate work or you need to customize the reporting functions to take effect.

1,128

(5 replies, posted in Setup)

you can install modules manually,  which is based on the place, you require to use

There is directory permission problem  i guess  and there is one missing php extension.

so check your php additional packages.

hi,

I am really happy to inform that, i have done a custom security for the login phase, which will help peoples to prevent anonymous logins  from unknown times, you can configure it as per your shifts and based on employee and their shift assignments.

more details,

kvcodes.com/

1,130

(4 replies, posted in Setup)

yes you can stop loading on the UI. but without its functions, you can't process, finance part .

and by the way , if you go with removing the functional components, which will help you definitely.

the query worked, and it created a column. but it immediately executed the " ROLLBACK" query, than it will be reveresed.

Thanks both of you.
Barbarian, i tried the code with PHPmyadmin. it works fine there.

Cambell,  Actually the user is default user in phpmyadmin.

the query is not working with the TR_PREF and $Cust_id. while using the above code.  And my query failed to work.

And i tried to show the sql queries by enabling the option on config.php.  but it showed " ROLLBACK"

What is the issue in it.

Hi,

I need to add a column using alter table query. here is the query string i used. but it dooesnot work for me.

$kv_sql = "ALTER TABLE ".TB_PREF."table_name ADD ".db_escape($cust_id)." INT(10) NOT NULL" ; 

    db_query($kv_sql, "The employee attendance could not be added");

But t doesnot work in it. 
i dont know the bug.

Actually the change will do some additional lines in the  access/login.php and applications/setup.php.  Except that rest of the codes and table is new. so it wont affect the rest of operations.

Also this will be an included file and i have disabling options. so, you can disable it whenever you think to disable.
And the things are loaded with a primary company and also its common one for all the companies,which you are creating with it. This is one of a limitation now.

I am still working on it to make the things working better and more featured.

Here i have a functionality to restrict the login access. The thing is simple.

I have admin options to set the office working hours.  Than your employees can login into the particular time. and you can have separate string to login any time.

Just share with it to give access to any other peoples.

Soon i will give a youtube video to know more about it...

Thanks, both of you. i found the solution actually.

The problem is loging.php doesnot have the db connection. i mean, it doesnot have direct php script to query database. May be this is for security reasons. so i just created jshttprequest call method to perform my operations.,..

Now my issue is resolved.

Actually , the table name is  0_kv_sys_prefs.  The problem is , its not working any mysql operations. it works after logged into the working area. the results gets exactly.

Which one prevent the Mysql functions in the login.php

is it preventing for sql injection or hijacking issues?

and guide me the safest thing to handle this operation.

mysql operations doesnot work on login.php. What should i do now?

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,144

(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,145

(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,150

(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