51

(4 replies, posted in FA Modifications)

list_updated works great on lists.
Is there some function available for input updates???

Can't find it. Maybe, I'm kinda blind!?!?

barney

52

(0 replies, posted in Setup)

I love this theme called 'elegant'. Its very pretty and even handy.
But unfortunately, after chosing an option, it sticks to the quickmenu at the left.
How could we get 'elegant' to set focus on the first form item??
barney

53

(2 replies, posted in Translations)

We are using german language file and so far it seems to best: german 'umlaute' are shown (and stored!) as they should be. But unfortunately, the EUR-symbol (€) is not part of ISO-8859-1.
Does anbody have a solution?
barney

54

(5 replies, posted in Setup)

Hi Janusz,
as far as i know: character

55

(5 replies, posted in Setup)

Via mysql-editor €-symbol can be entered.
But as soon as I save a record with a €-symbol via fa, the symbol is a ?.
I am using iso-8859-1 in mysql and langugae de_DE in fa.

56

(6 replies, posted in Accounts Receivable)

I see.
Thks, barney

57

(2 replies, posted in FA Modifications)

Thks itronics, I'll study...
barney

58

(2 replies, posted in FA Modifications)

Could anybody give some information, where to read best about Ajax and how it is implemented in FA!?!?
Thks,
barney

59

(6 replies, posted in Accounts Receivable)

Yes , but I would like a multi line edit box like in items.php with the (long) description.
barney

60

(6 replies, posted in Accounts Receivable)

I wonder, if we could have inside sales order entry an item description field, as it is available in items.php: textarea_row???
barney

Ah, sorry!
In 'sales order entry': When you enter the 'item code', item price, item qty etc. are fetched and shown.
I would like something similar: Just after entering the quantity there should be a price update where the price depends on quantity.

Should I be even more specific??
Thks in advance,
barney

Hello,
why do you differentiate between oder no. and reference no?
We would like to preset the order no. (order, quotation, invoice etc.) once and then let it add 1 with every instance. Is this possible?
barneyfa

Ok. I understand: This question seems not to be worth an answer...
Perhaps could somebody give me a hint, where to read about it???
barney

Hello,
in sales order entry: I would like to implement some kind of price calculation after quantity input.
Could somebody tell me, how to

65

(19 replies, posted in Modules Add-on's)

As I understand, the security section codes are rewritten during integration...
I haven't verfied this until now.

barney

66

(19 replies, posted in Modules Add-on's)

Sounds interesting ....

barney

67

(13 replies, posted in FA Modifications)

Thksalotlancelot!!!

Thats it. Great  smile and of course: my fault. sad

Thks again,
barney

68

(13 replies, posted in FA Modifications)

Where do i activate the extension for the current company?
barneyfa

69

(13 replies, posted in FA Modifications)

@ captain_kuro:
Well, the extension shows now in system administratin, after adding security codes in access_levels.inc.
I thought, install_acess in hooks.php would do this for me. Unfortunately not. Maybe that's the reason, because no tab is added?!?!
Is there a way to see what happens during installation of an extension, i mean beside debugging??
barney

70

(13 replies, posted in FA Modifications)

Well, I adapted installed_extensions.php:
----------------------------------------
  43 =>
  array (
    'package' => 'claim',
    'name' => 'claim',
    'version' => '2.3.4',
    'type' => 'extension',
    'active' => true,
    'path' => 'modules/claim',
  ),
----------------------------------------
Wrong, right, necessary??
But the claim extension never shows in the privileges part of system administration??? 
Hmm??  sad
barney

71

(8 replies, posted in Accounts Receivable)

Ah yes.
And do I have do add two records?
One for tax account and one for discount account?
Or can i handle this with one action?
barney

72

(13 replies, posted in FA Modifications)

Still struggling....

What is wrong?
I added a folder 'claim' in modules, then put in hooks.php and travel.php:
hooks.php:
<?php
define ('SS_CL',71<<8);

class claim_app extends application
{
        function claim_app()
        {
                $this->application("claim", _($this->help_context = "&Claim"));

                $this->add_module(_("Claim Application"));
                $this->add_lapp_function(0, _("Sales Travelling Claim"),
                        $path_to_root.'/modules/claim/travel.php', 'SA_CLAPPLY', MENU_CLAIM);

                $this->add_extensions();
        }
}


class hooks_claim extends hooks {
        var $module_name = 'claim'; // extension module name.

        function install_tabs($app) {
                set_ext_domain('modules/claim');        // set text domain for gettext
                $app->add_application(new claim_app); // add menu tab defined by example_class
                set_ext_domain();
        }


        function install_access()
        {
                $security_sections[SS_CL] =     _("Claim");

                $security_areas['SA_CLAPPLY'] = array(SS_CL|1, _("Claim Application"));
                $security_areas['SA_CLCHECK'] = array(SS_CL|2, _("Check Claim"));
                $security_areas['SA_CLAPPROVE'] = array(SS_CL|3, _("Approve Claim"));
                $security_areas['SA_CLPAYMENT'] = array(SS_CL|4, _("Release Payment"));
                $security_areas['SA_CLVIEW'] = array(SS_CL|5, _("View My Claim"));

                return array($security_areas, $security_sections);
        }

}

?>

travel.php:
<?php
/**********************************************
Author: Joe Hunt
Name: Import of CSV formatted customers
Free software under GNU GPL

This module helps to upload a bunch a customers from a csv file.
Modified by Gaston Huot 20100626 to take into account the new security included in version 2.2 and add a few colums:
-Customer short name
-Sales_Group for the branch. In this case you have to specify the id, not the name-despription
***********************************************/
$page_security = 'SA_CLAPPLY';
$path_to_root="../..";

include($path_to_root . "/includes/session.inc");
add_access_extensions();

page("Import of CSV formatted Customers");

include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");

include_once($path_to_root . "/sales/includes/db/branches_db.inc");
include_once($path_to_root . "/sales/includes/db/customers_db.inc");

error_reporting(E_ALL);
ini_set("display_errors", "on");

if (isset($_POST['import']))
{
    if (isset($_FILES['imp']) && $_FILES['imp']['name'] != '')
    {
        $filename = $_FILES['imp']['tmp_name'];
        $sep = $_POST['sep'];

        $fp = @fopen($filename, "r");
        if (!$fp)
            die("can not open file $filename");

        $lines = $i = $j = 0;
        // id; name; short_name; address1; address2; address3; address4; area; sales_group; phone; fax; email; contact; tax_id; currency; tax_group; gruppe; ktoart; mandant; ktotyp; adresse; sammelkto; bebuchbarkeit; EULand; EUWarenbewegung; EUDreiecksgeschaeft; zahlungskond;
        while ($data = fgetcsv($fp, 4096, $sep))
        {
            if ($lines++ == 0)
                continue;
            list($id, $name, $short_name, $addr1, $addr2, $addr3, $addr4, $area, $sales_group, $phone, $fax, $email, $contact, $tax_id, $currency, $tax_group, $gruppe, $ktoart, $mandant, $ktotyp, $adresse, $sammelkto, $bebuchbarkeit, $euland, $euwarenbewegung, $eudreiecksgeschaeft, $zahlungskond) = $data;
            $name = db_escape($name);
            $short_name= db_escape($short_name);
            $addr = "";
            if ($addr1 != "")
                $addr .= "$addr1\n";
            if ($addr2 != "")
                $addr .= "$addr2\n";
            if ($addr3 != "")
                $addr .= "$addr3\n";
            if ($addr4 != "")
                $addr .= "$addr4\n";
            $addr = db_escape($addr);
            $sql = "SELECT area_code, description FROM ".TB_PREF."areas WHERE description='$area'";

            $result = db_query($sql, "could not get area");

            $row = db_fetch_row($result);
            if (!$row)
            {
                $sql = "INSERT INTO ".TB_PREF."areas (description) VALUES ('$area')";
                db_query($sql,"The sales area could not be added");
                $area_code = db_insert_id();
            }
            else
                $area_code = $row[0];
            if ($currency == "")
                $currency = get_company_pref("curr_default");
            else
            {
                $row = get_currency($currency);
                if (!$row)
                    add_currency($currency, "", "", "", "");
            }
            $taxgid = "";
            if ($tax_group != "") {
                $sql = "select id from ".TB_PREF."tax_groups WHERE name='".$tax_group."'";
                $result = db_query($sql, "Non Taxable Group");
                $row = db_fetch_row($result);
                if ($row) $taxgid = $row[0];
            }
            if ($taxgid == "") $taxgid = $_POST['tax_group_id'];
            if ($id != "")
                $sql = "SELECT debtor_no FROM ".TB_PREF."debtors_master WHERE debtor_no=$id";
            else
                $sql = "SELECT debtor_no FROM ".TB_PREF."debtors_master WHERE name=$name";
            $result = db_query($sql,"customer could not be retreived");
            $row = db_fetch_row($result);
            if (!$row)
            {
                if ($id != "")
                {
                    $sql = "INSERT INTO ".TB_PREF."debtors_master (debtor_no, name, debtor_ref, address, email,
                        tax_id, curr_code, sales_type, payment_terms, credit_status, zahlungskond)
                        VALUES ($id, $name, $short_name, $addr, '$email', '$tax_id', '$currency', {$_POST['sales_type']},
                        {$_POST['payment_terms']}, 1, $zahlungskond)";
                }
                else
                {
                    $sql = "INSERT INTO ".TB_PREF."debtors_master (name, debtor_ref, address, email,
                        tax_id, curr_code, sales_type, payment_terms, credit_status, zahlungskond)
                        VALUES ($name, $short_name , $addr, '$email', '$tax_id', '$currency', {$_POST['sales_type']},
                        {$_POST['payment_terms']}, 1, $zahlungskond)";
                }
                // print $sql . "<br>/n";
                db_query($sql, "The customer could not be added");
                if ($id == "")
                    $id = db_insert_id();
                $sql = "INSERT INTO ".TB_PREF."cust_branch (debtor_no, br_name, branch_ref, br_address, area, salesman, group_no,
                    phone, fax, contact_name, email, default_location, tax_group_id, sales_account,
                    sales_discount_account, receivables_account, payment_discount_account, br_post_address)
                    VALUES ($id, $name, $short_name, $addr, '$area_code', '{$_POST['salesman']}', '$sales_group', '$phone', '$fax',
                    '$contact', '$email', '{$_POST['default_location']}', $taxgid, '{$_POST['sales_account']}',
                    '{$_POST['sales_discount_account']}', '{$_POST['receivables_account']}',
                    '{$_POST['payment_discount_account']}', $addr)";
                // print $sql . "<br>/n";
                db_query($sql, "The customer branch could not be added");

                $i++;
            }
            else
            {
                $sql = "UPDATE ".TB_PREF."debtors_master
      SET address=$addr,
                    email='$email',
                    tax_id='$tax_id',
                    debtor_ref=$short_name,
                    curr_code='$currency',
                    sales_type={$_POST['sales_type']},
                    payment_terms={$_POST['payment_terms']},
                    zahlungskond='$zahlungskond'
                    WHERE name=$name";

                // print $sql . "<br>/n";
                db_query($sql, "The customer could not be updated");

                $j++;
            }
        }
        @fclose($fp);

        display_notification("$i customer posts created, $j customer posts updated.");

    }
    else
        display_error("No CSV file selected");
}

start_form(true);

start_table(TABLESTYLE2, "width=40%");
   
table_section_title("Default GL Accounts");

$company_record = get_company_prefs();

if (!isset($_POST['sales_account']) || $_POST['sales_account'] == "")
       $_POST['sales_account'] = $company_record["default_sales_act"];

if (!isset($_POST['sales_discount_account']) || $_POST['sales_discount_account'] == "")
       $_POST['sales_discount_account'] = $company_record["default_sales_discount_act"];

if (!isset($_POST['receivables_account']) || $_POST['receivables_account'] == "")
    $_POST['receivables_account'] = $company_record["debtors_act"];

if (!isset($_POST['payment_discount_account']) || $_POST['payment_discount_account'] == "")
    $_POST['payment_discount_account'] = $company_record["default_prompt_payment_act"];

if (!isset($_POST['sep']))
    $_POST['sep'] = ";";

gl_all_accounts_list_row("Sales Account:", 'sales_account', $_POST['sales_account']);
gl_all_accounts_list_row("Sales Discount Account:", 'sales_discount_account', $_POST['sales_discount_account']);
gl_all_accounts_list_row("Receivables Account:", 'receivables_account', $_POST['receivables_account']);
gl_all_accounts_list_row("Payment Discount Account:", 'payment_discount_account', $_POST['payment_discount_account']);

table_section_title("Separator, Location, Tax Type, Sales Type, Sales Person and Payment Terms");
text_row("Field separator:", 'sep', $_POST['sep'], 2, 1);
locations_list_row("Location:", 'default_location', null);
// This was a bug. Wrong Tax list - Tax Location not Item Tax Types
//item_tax_types_list_row("Item Tax Type:", 'tax_group_id', null);
tax_groups_list_row(_("Default Tax Group:"), 'tax_group_id', null);
sales_types_list_row("Sales Type:", 'sales_type', null);
sales_persons_list_row("Sales Person", 'salesman', null);
payment_terms_list_row("Payment Terms", 'payment_terms', null);
label_row("CSV Import File:", "<input type='file' id='imp' name='imp'>");

end_table(1);

submit_center('import', "Import CSV File");

end_form();

end_page();

?>


Then i installed the extension, made it active, but no success: Nothing can't be seen....    sad


Any idea?
barney

73

(8 replies, posted in Accounts Receivable)

Which is the program / module for doing manual entry?
barney

74

(13 replies, posted in FA Modifications)

Very helpful...
thanks, barney

75

(19 replies, posted in Modules Add-on's)

Hi captain_kuro,

thanks a lot,

barney