23 require_once DIR_IMPORT_ACCOUNT.
"/database/class_impacc_import_detail_sql.php";
39 $p_thousand, $p_decimal);
40 if (isNumber($row->id_quant_conv)==0)
42 $and=($row->id_message==
"")?
"":
",";
43 $row->id_message.=$and.
"CK_INVALID_AMOUNT";
56 $p_thousand, $p_decimal);
57 if (isNumber($row->id_amount_vat_conv)==0)
59 $and=($row->id_message==
"")?
"":
",";
60 $row->id_message.=$and.
"CK_INVALID_AMOUNT";
71 $cn=Dossier::connect();
73 $card->get_by_qcode($row->id_acc_second,
false);
76 $and=($row->id_message==
"")?
"":
",";
77 $row->id_message.=$and.
"CK_INVALID_ACCOUNTING";
86 $cn=Dossier::connect();
89 if ($g_parameter->MY_TVA_USE==
"N")
98 $exist=
$cn->get_value(
"select count(*) from impacc.parameter_tva where tva_code=$1",
117 $test=DateTime::createFromFormat($p_format_date,
$p_date);
125 $p_return=$test->format(
'd.m.Y');
137 $cn=Dossier::connect();
138 $card=
new Fiche(
$cn);
139 $card->get_by_qcode($p_account,
false);
148 $poste_str=$card->strAttribut(ATTR_DEF_ACCOUNT);
150 $poste=
new Acc_Account_Ledger(
$cn, $poste_str);
151 if ($poste->do_exist()==0)
for($i=0;$i< Database::num_row($ret);$i++) $row
static check_belong_card(Fiche $p_account, $p_ledger)
Check that a card belong to a ledger.
static check_date($p_date, $p_format_date)
Check that the date payment has valid format . Return false or.
static check_service(Impacc_Import_detail_SQL $row)
Check that the sale / purchase card exist Update the object $row (id_message)
static check_amount_vat(Impacc_Import_detail_SQL $row, $p_thousand, $p_decimal)
static check_quantity(Impacc_Import_detail_SQL $row, $p_thousand, $p_decimal)
static check_tva($p_tva_code)
Check that TVA_CODE does exist , return true if exists otherwise false.
All the methods to check the column from The table impacc.import_detail are here. ...
static check_card($p_account)
Check that a card exist and use a valid accounting.