Typo , debug information, jQuery available

This commit is contained in:
sparkyx 2021-07-08 17:23:22 +02:00
parent d217bd12b8
commit d06f7a89d5
4 changed files with 22 additions and 14 deletions

View file

@ -756,12 +756,12 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$operation_currency->insert();
$tot_amount_cur=round(bcadd($tot_amount_cur,$acc_amount->amount_currency),2);
$tot_amount_cur=round(bcadd($tot_amount_cur,$acc_amount->amount_vat_currency),2);
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
echo __LINE__." insert into operation currency oc_amount:{$acc_amount->amount_currency} oc_vat_amount {$acc_amount->amount_vat_currency} <br>";
}
} // end loop : save all items
/* save total customer */
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
echo __LINE__." tot_amount $tot_amount<br>";
echo __LINE__." tot_tva $tot_tva<br>";
@ -844,7 +844,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
// Total DEB
$acc_operation->amount=$this->db->get_value("select sum(j_montant) from jrnx where j_grpt = $1 and j_debit='t'",
array($seq));
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
echo __LINE__." amount ".$acc_operation->amount."<br>";
}

View file

@ -299,7 +299,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
$tot_amount = bcadd($tot_amount, $amount);
$tot_amount = round($tot_amount, 2);
if ( DEBUGNOALYSS > 0 ) { echo __LINE__." tot_amount $tot_amount<br>";}
if ( DEBUGNOALYSS > 1 ) { echo __LINE__." tot_amount $tot_amount<br>";}
$acc_operation = new Acc_Operation($this->db);
$acc_operation->date = $e_date;
$sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
@ -448,7 +448,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
/* save total customer */
$cust_amount = bcadd($tot_amount, $tot_tva);
$cust_amount = round($cust_amount,2);
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
echo __LINE__." cust_amount $cust_amount<br>";
echo __LINE__." tot_amount $tot_amount<br>";
echo __LINE__." tot_tva $tot_tva<br>";
@ -485,7 +485,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
* if if ($g_parameter->MY_TVA_USE == 'Y' )
*/
if ($g_parameter->MY_TVA_USE == 'Y') {
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
var_dump($tva);
}
foreach ($tva as $i => $value) {
@ -510,7 +510,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
$tot_debit=round($tot_debit, 2);
}
$acc_operation->insert_jrnx();
if ( DEBUGNOALYSS > 0 ) {
if ( DEBUGNOALYSS > 1 ) {
echo __LINE__." tot_tva $tot_tva<br>";
}
@ -539,7 +539,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
*/
/* insert into jrn */
if ( DEBUGNOALYSS > 0 ) { echo __LINE__." tot_debit ".round($tot_debit,2)."<br>"; }
if ( DEBUGNOALYSS > 1 ) { echo __LINE__." tot_debit ".round($tot_debit,2)."<br>"; }
$acc_operation = new Acc_Operation($this->db);
$acc_operation->date = $e_date;
$acc_operation->echeance = $e_ech;
@ -566,11 +566,13 @@ class Acc_Ledger_Sold extends Acc_Ledger {
$this->inc_seq_pj();
}
$this->db->exec_sql("update jrn set jr_internal='" . $internal . "' where " .
" jr_grpt_id = " . $seq);
$this->db->exec_sql("update jrn set jr_internal=$1 where jr_grpt_id = $2" ,[$internal,$seq]);
/* update quant_sold */
$this->db->exec_sql('update quant_sold set qs_internal = $1 where j_id in (select j_id from jrnx where j_grpt=$2)', array($internal, $seq));
$this->db->exec_sql('update quant_sold set qs_internal = $1
where j_id in (select j_id from jrnx where j_grpt=$2)'
, array($internal, $seq));
/* Save the attachment or generate doc */
if (isset($_FILES['pj'])) {

View file

@ -2758,6 +2758,10 @@ function load_all_script()
include_once NOALYSS_INCLUDE."/lib/message_javascript.php";
echo JS_INFOBULLE;
echo js_include("jquery-3.6.0.min.js");
echo <<<EOF
<script>jQuery.noConflict();</script>
EOF;
echo js_include('smoke.js');
echo js_include('prototype.js');
echo js_include('scriptaculous.js');

View file

@ -1,7 +1,9 @@
begin;
update menu_ref set me_menu='Profil' , me_description_etendue='Configuration des profils des utilisateurs, permet de fixer les journaux, profils dans les documents et stock que ce profil peut utiliser. Cela limite les utilisateurs puisque ceux-ci ont un profil',
me_description='Configuration profil' where me_code='CFGPRO';
update menu_ref set me_menu='Profil' , me_description_etendue='Configuration des profils des utilisateurs, permet de fixer les journaux, profils dans les documents et stock que ce profil peut utiliser. Cela limite les utilisateurs puisque ceux-ci ont un profil', me_description='Configuration profil' where me_code='CFGPRO';
update menu_ref set me_menu='Financier' , me_description_etendue='journaux financier, trésorerie, caisse', me_description='saisies de relevés bancaires, d''extraits de compte ' where me_code='MENUFIN';
COMMENT ON TABLE public.jrn_rapt IS 'links between operations';
insert into version (val,v_description) values (163,'typo in menu');
commit ;
commit ;