From 6969339159d178d8102861bc40fa87d2bbbc9da7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 3 Oct 2015 08:18:03 +0200 Subject: [PATCH 1/4] Try for responsive design --- htdocs/theme/md_exp/style.css.php | 36 +++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/md_exp/style.css.php b/htdocs/theme/md_exp/style.css.php index e92ea9f2423..412f6dea8d0 100644 --- a/htdocs/theme/md_exp/style.css.php +++ b/htdocs/theme/md_exp/style.css.php @@ -3540,7 +3540,23 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } + + div.fichethirdleft { + width: 100%; + } + + div.fichetwothirdright { + width: 100%; + } + + div.fichehalfleft { + width: 100%; + } + + div.fichehalfright { + width: 100%; + } } @media only screen and (max-width: 570px) { @@ -3554,7 +3570,23 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } + + div.fichethirdleft { + width: 100%; + } + + div.fichetwothirdright { + width: 100%; + } + + div.fichehalfleft { + width: 100%; + } + + div.fichehalfright { + width: 100%; + } } From e1f946578b2dcb96a978991bdeacc91623638264 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 7 Oct 2015 21:06:55 +0200 Subject: [PATCH 2/4] Fix presentation --- htdocs/compta/stats/cabyuser.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 385ac1f140c..cb8151cf33c 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 7b9cfdd7913..dade07fd0e3 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -350,7 +350,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), From f8ade01f0efc5c179ba3bb3e0bb70fca5b66d15d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 7 Oct 2015 21:48:46 +0200 Subject: [PATCH 3/4] New : Add payment donation in accountancy expert --- htdocs/accountancy/journal/bankjournal.php | 176 +++++++++++---------- 1 file changed, 92 insertions(+), 84 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 812acf5c923..01957fcedf5 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; @@ -120,6 +121,7 @@ $paymentsupplierstatic = new PaiementFourn($db); $societestatic = new Societe($db); $userstatic = new User($db); $chargestatic = new ChargeSociales($db); +$paymentdonstatic = new PaymentDonation($db); $paymentvatstatic = new TVA($db); $paymentsalstatic = new PaymentSalary($db); @@ -133,7 +135,8 @@ if ($result) { $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); $accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef")); $accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef")); - + $accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef")); + $tabpay = array (); $tabbq = array (); $tabtp = array (); @@ -174,95 +177,100 @@ if ($result) { // get_url may return -1 which is not traversable if (is_array($links)) { - - foreach ( $links as $key => $val ) - { - $tabtype[$obj->rowid] = $links[$key]['type']; + foreach ( $links as $key => $val ) + { + $tabtype[$obj->rowid] = $links[$key]['type']; - if ($links[$key]['type'] == 'payment') - { - $paymentstatic->id = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'payment_supplier') - { - $paymentsupplierstatic->id = $links[$key]['url_id']; - $paymentsupplierstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'company') - { - $societestatic->id = $links[$key]['url_id']; - $societestatic->name = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } - else if ($links[$key]['type'] == 'user') - { - $userstatic->id = $links[$key]['url_id']; - $userstatic->name = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); - // $tabtp[$obj->rowid][$compta_user] += $obj->amount; - } - else if ($links[$key]['type'] == 'sc') - { - $chargestatic->id = $links[$key]['url_id']; - $chargestatic->ref = $links[$key]['url_id']; - - $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); - if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { - if ($reg[1] == 'socialcontribution') - $reg[1] = 'SocialContribution'; - $chargestatic->lib = $langs->trans($reg[1]); - } - else + if ($links[$key]['type'] == 'payment') { - $chargestatic->lib = $links[$key]['label']; + $paymentstatic->id = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); } - $chargestatic->ref = $chargestatic->lib; - $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); - - $sqlmid = 'SELECT cchgsoc.accountancy_code'; - $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; - $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; - - - dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); - $resultmid = $db->query($sqlmid); - if ($resultmid) + else if ($links[$key]['type'] == 'payment_supplier') { - $objmid = $db->fetch_object($resultmid); - $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + $paymentsupplierstatic->id = $links[$key]['url_id']; + $paymentsupplierstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); } + else if ($links[$key]['type'] == 'company') + { + $societestatic->id = $links[$key]['url_id']; + $societestatic->name = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); + $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + } + else if ($links[$key]['type'] == 'user') + { + $userstatic->id = $links[$key]['url_id']; + $userstatic->name = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); + // $tabtp[$obj->rowid][$compta_user] += $obj->amount; + } + else if ($links[$key]['type'] == 'sc') + { + $chargestatic->id = $links[$key]['url_id']; + $chargestatic->ref = $links[$key]['url_id']; + + $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); + if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { + if ($reg[1] == 'socialcontribution') + $reg[1] = 'SocialContribution'; + $chargestatic->lib = $langs->trans($reg[1]); + } + else + { + $chargestatic->lib = $links[$key]['label']; + } + $chargestatic->ref = $chargestatic->lib; + $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); + + $sqlmid = 'SELECT cchgsoc.accountancy_code'; + $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; + $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; + + + dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); + $resultmid = $db->query($sqlmid); + if ($resultmid) + { + $objmid = $db->fetch_object($resultmid); + $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + } + } + else if ($links[$key]['type'] == 'payment_donation') + { + $paymentdonstatic->id = $links[$key]['url_id']; + $paymentdonstatic->fk_donation = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation"); + $tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount; + } + else if ($links[$key]['type'] == 'payment_vat') + { + $paymentvatstatic->id = $links[$key]['url_id']; + $paymentvatstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat"); + $tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount; + } + else if ($links[$key]['type'] == 'payment_salary') + { + $paymentsalstatic->id = $links[$key]['url_id']; + $paymentsalstatic->ref = $links[$key]['url_id']; + $paymentsalstatic->label = $links[$key]['label']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); + $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; + } + else if ($links[$key]['type'] == 'banktransfert') + { + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; + } + /*else { + $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; + }*/ } - else if ($links[$key]['type'] == 'payment_vat') - { - $paymentvatstatic->id = $links[$key]['url_id']; - $paymentvatstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat"); - $tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount; - } - else if ($links[$key]['type'] == 'payment_salary') - { - $paymentsalstatic->id = $links[$key]['url_id']; - $paymentsalstatic->ref = $links[$key]['url_id']; - $paymentsalstatic->label = $links[$key]['label']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); - $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; - } - else if ($links[$key]['type'] == 'banktransfert') - { - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; - } - /*else { - $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; - }*/ - } - } $tabbq[$obj->rowid][$compta_bank] += $obj->amount; From deaf23870e3d2e980fd7c329abec94d493f35d87 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 7 Oct 2015 21:52:30 +0200 Subject: [PATCH 4/4] Cancel work on responsive design --- htdocs/theme/md/style.css.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index d9910f82dd7..b917022cf84 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3560,22 +3560,6 @@ border-top-right-radius: 6px; position: absolute; width: px; } - - div.fichethirdleft { - width: 100%; - } - - div.fichetwothirdright { - width: 100%; - } - - div.fichehalfleft { - width: 100%; - } - - div.fichehalfright { - width: 100%; - } } @media only screen and (max-width: 570px) { @@ -3590,22 +3574,6 @@ border-top-right-radius: 6px; position: absolute; width: px; } - - div.fichethirdleft { - width: 100%; - } - - div.fichetwothirdright { - width: 100%; - } - - div.fichehalfleft { - width: 100%; - } - - div.fichehalfright { - width: 100%; - } }