diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 79a8a531ec9..82ba00a882c 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -39,6 +39,7 @@ $mesg = ''; $action = GETPOST('action','aZ09'); $backtopage = GETPOST('backtopage','alpha'); $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $rowid = GETPOST('rowid', 'int'); $cancel = GETPOST('cancel','alpha'); @@ -261,8 +262,10 @@ if ($action == 'create') { print ''; print ''; -} else if ($id) { - $result = $object->fetch($id); +} +else if ($id > 0 || $ref) { + + $result = $object->fetch($id, $ref, 1); if ($result > 0) { dol_htmloutput_mesg($mesg); @@ -329,17 +332,18 @@ if ($action == 'create') { // View mode $linkback = '' . $langs->trans("BackToList") . ''; - dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); + dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr'); + + dol_banner_tab($object, 'ref', $linkback, 1, 'account_number', 'ref'); + + + print '
'; + print '
'; print ''; - // Account number - print ''; - print ''; - print ''; - // Label - print ''; + print ''; print ''; // Account parent @@ -361,20 +365,10 @@ if ($action == 'create') { print ''; print ''; - // Active - print ''; - print ''; - print '
' . $langs->trans("AccountNumber") . '' . $object->account_number . '' . $linkback . '
' . $langs->trans("Label") . '
' . $langs->trans("Label") . '' . $object->label . '
' . $langs->trans("Pcgsubtype") . '' . $object->pcg_subtype . '
' . $langs->trans("Status") . ''; - print $object->getLibStatut(4); - /*if (empty($object->active)) { - print img_picto($langs->trans("Disabled"), 'switch_off'); - } else { - print img_picto($langs->trans("Activated"), 'switch_on'); - }*/ - - print '
'; + print '
'; + dol_fiche_end(); /* @@ -397,7 +391,7 @@ if ($action == 'create') { print ''; } } else { - dol_print_error($db); + dol_print_error($db, $object->error, $object->errors); } } diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 74d86d567bf..f5dd7159528 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -30,6 +30,21 @@ */ class AccountingAccount extends CommonObject { + public $element='accounting_account'; + public $table_element='accounting_account'; + public $picto = 'billr'; + + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; + /** + * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user + * @var integer + */ + public $restrictiononfksoc = 1; + var $db; var $error; var $errors; @@ -48,13 +63,17 @@ class AccountingAccount extends CommonObject var $active; // duplicate with status var $status; + /** * Constructor * * @param DoliDB $db Database handle */ function __construct($db) { + global $conf; + $this->db = $db; + $this->next_prev_filter='fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; // Used to add a filter in Form::showrefnav method } /** @@ -91,6 +110,7 @@ class AccountingAccount extends CommonObject if ($obj) { $this->id = $obj->rowid; $this->rowid = $obj->rowid; + $this->ref = $obj->account_number; $this->datec = $obj->datec; $this->tms = $obj->tms; $this->fk_pcg_version = $obj->fk_pcg_version; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 0c782c024a1..e8af356a245 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -250,14 +250,14 @@ if ($action == 'writebookkeeping') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If not already into bookkeeping, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { continue; @@ -560,14 +560,14 @@ if ($action == 'exportcsv') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If not already into bookkeeping, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { continue; @@ -760,14 +760,14 @@ if (empty($action) || $action == 'view') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If no, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { print ''; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 2a235cbe5d3..128c6be1471 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -252,14 +252,14 @@ if ($action == 'writebookkeeping') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If not already into bookkeeping, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { continue; @@ -515,14 +515,14 @@ if ($action == 'exportcsv') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If not already into bookkeeping, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { continue; @@ -692,14 +692,14 @@ if (empty($action) || $action == 'view') { // Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched $replacedinvoice = 0; - if ($invoicestatic->close_code == 'replaced') + if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED) { $replacedinvoice = 1; $alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping. if ($alreadydispatched) $replacedinvoice = 2; } - // If not already into bookkeeping, we won't add it, if yes, we will also add the counterpart. + // If not already into bookkeeping, we won't add it, if yes, add the counterpart ???. if ($replacedinvoice == 1) { print ''; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 65b38970a6e..0aa8b14199d 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -80,8 +80,8 @@ print img_picto('','puce').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.' if (! empty($setupcompanynotcomplete)) { $langs->load("errors"); - $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); - print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'
'; + $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); + print '
'.$warnpicto.$langs->trans("WarningMandatorySetupNotComplete").'
'; } print '
'; print '
'; @@ -92,8 +92,8 @@ print img_picto('','puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.' if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled { $langs->load("errors"); - $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete")); - print '
'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'
'; + $warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); + print '
'.$warnpicto.$langs->trans("WarningMandatorySetupNotComplete").'
'; } print '
'; print '
'; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 234ccf281f0..b547f12a76e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3167,7 +3167,7 @@ else if ($id > 0 || ! empty($ref)) $i ++; // Texte $i = 0; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f1d8c5d1a46..15143f14cff 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -214,10 +214,10 @@ class Facture extends CommonInvoice */ const STATUS_ABANDONED = 3; - const CLOSECODE_DISCOUNTVAT = 'discount_vat'; - const CLOSECODE_BADDEBT = 'badcustomer'; - const CLOSECODE_ABANDONED = 'abandon'; - const CLOSECODE_REPLACED = 'replaced'; + const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte + const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned - bad + const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other + const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice /** * Constructor @@ -2053,11 +2053,11 @@ class Facture extends CommonInvoice * of no payment even if merchandises were sent). * * @param User $user Object user making change - * @param string $close_code Code de fermeture + * @param string $close_code Code of closing invoice (CLOSECODE_REPLACED, CLOSECODE_...) * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ - function set_canceled($user,$close_code='',$close_note='') + function set_canceled($user, $close_code='', $close_note='') { dol_syslog(get_class($this)."::set_canceled rowid=".$this->id, LOG_DEBUG); @@ -2187,7 +2187,7 @@ class Facture extends CommonInvoice return -12; } - $result=$facreplaced->set_canceled($user,'replaced',''); + $result=$facreplaced->set_canceled($user, self::CLOSECODE_REPLACED, ''); if ($result < 0) { $this->error=$facreplaced->error; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 74adb468190..bbdc6f94dfb 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1133,31 +1133,30 @@ class Paiement extends CommonObject }*/ return ''; } - + /** - * Load the third party of object, from id into this->thirdparty - * - * @param int $force_thirdparty_id Force thirdparty id - * @return int <0 if KO, >0 if OK - */ - function fetch_thirdparty($force_thirdparty_id=0) - { + * Load the third party of object, from id into this->thirdparty + * + * @param int $force_thirdparty_id Force thirdparty id + * @return int <0 if KO, >0 if OK + */ + function fetch_thirdparty($force_thirdparty_id=0) + { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; - + if (empty($force_thirdparty_id)) { - $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first invoice to get him + $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first supplier invoice to get him if (!empty($billsarray)) { - $supplier_invoice = new FactureFournisseur($this->db); - if ($supplier_invoice->fetch($billsarray[0]) > 0) + $invoice = new Facture($this->db); + if ($invoice->fetch($billsarray[0]) > 0) { - $force_thirdparty_id = $supplier_invoice->fk_soc; + $force_thirdparty_id = $invoice->fk_soc; } } } - - return parent::fetch_thirdparty($force_thirdparty_id); - } + return parent::fetch_thirdparty($force_thirdparty_id); + } } diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 4904f1ee5ca..1fa48738e66 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +$langs->load("accountancy"); + $socid = GETPOST('socid','int'); // Security check diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 31a95f8cd78..db2152a00ae 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -76,17 +76,17 @@ class Contact extends CommonObject public $email; public $skype; public $photo; - public $jabberid; + public $jabberid; public $phone_pro; public $phone_perso; public $phone_mobile; - public $fax; + public $fax; - public $priv; + public $priv; public $birthday; public $default_lang; - public $no_email; // 1=Don't send e-mail to this contact, 0=do + public $no_email; // 1=Don't send e-mail to this contact, 0=do public $ref_facturation; // Reference number of invoice for which it is contact public $ref_contrat; // Nb de reference contrat pour lequel il est contact @@ -178,6 +178,8 @@ class Contact extends CommonObject if (empty($this->statut)) $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request $entity = (isset($this->entity) && is_numeric($this->entity)?$this->entity:$conf->entity); + $entity = isset($this->entity)?$this->entity:$conf->entity; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec"; $sql.= ", fk_soc"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4f347fb9f0e..8d513fae9bf 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6234,7 +6234,6 @@ class Form $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters, $object); // Note that $action and $object may have been modified by hook $object->next_prev_filter.=$hookmanager->resPrint; } - $previous_ref = $next_ref = ''; if ($shownav) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cfac17ac326..2b6820c353b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3096,7 +3096,7 @@ function img_info($titlealt = 'default') * Show warning logo * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"'). If 1 + * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"'). If 1, add float: right. Can't be "class" attribute. * @return string Return img tag */ function img_warning($titlealt = 'default', $moreatt = '') @@ -5479,7 +5479,12 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob $substitutionarray['__MEMBER_PHONEPRO__']=$msgishtml?dol_htmlentitiesbr($object->phone_perso):$object->phone_perso; $substitutionarray['__MEMBER_PHONEMOBILE__']=$msgishtml?dol_htmlentitiesbr($object->phone_mobile):$object->phone_mobile; - if (is_object($object->thirdparty) && $object->thirdparty->id > 0) + if (is_object($object) && $object->element == 'societe') + { + $substitutionarray['__THIRDPARTY_ID__'] = (is_object($object)?$object->id:''); + $substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object)?$object->name:''); + } + elseif (is_object($object->thirdparty) && $object->thirdparty->id > 0) { $substitutionarray['__THIRDPARTY_ID__'] = (is_object($object->thirdparty)?$object->thirdparty->id:''); $substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object->thirdparty)?$object->thirdparty->name:''); diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 52374cface8..ffecb1dbdd7 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -19,9 +19,9 @@ */ /** - * \file htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php + * \file htdocs/core/modules/supplier_invoice/doc/pdf_standard.modules.php * \ingroup fournisseur - * \brief Class file to generate the supplier invoices with the canelle model + * \brief Class file to generate the supplier invoice payment file with the standard model */ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php'; @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functionsnumtoword.lib.php'; /** - * Class to generate the supplier invoices with the canelle model + * Class to generate the supplier invoices payment file with the standard model */ class pdf_standard extends ModelePDFSuppliersPayments { @@ -97,7 +97,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->posxtotalht=80; $this->posxtva=90; $this->posxtotalttc=180; - + //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; if ($this->page_largeur < 210) // To work with US executive format { @@ -114,6 +114,10 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->localtax2=array(); $this->atleastoneratenotnull=0; $this->atleastonediscount=0; + + // Recupere emetteur + $this->emetteur=$mysoc; + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined } @@ -132,12 +136,6 @@ class pdf_standard extends ModelePDFSuppliersPayments { global $user,$langs,$conf,$mysoc,$hookmanager; - // Get source company - if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); - if (! is_object($object->thirdparty)) $object->thirdparty=$mysoc; // If fetch_thirdparty fails, object has no socid (specimen) - $this->emetteur=$object->thirdparty; - if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined - if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; @@ -172,7 +170,7 @@ class pdf_standard extends ModelePDFSuppliersPayments } } } - + $total = $object->montant; // Definition of $dir and $file @@ -264,7 +262,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Incoterm $height_incoterms = 0; - + $height_note=0; $iniY = $tab_top + 7; @@ -332,15 +330,15 @@ class pdf_standard extends ModelePDFSuppliersPayments } $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut - + // ref fourn $pdf->SetXY($this->posxreffacturefourn, $curY); $pdf->MultiCell($this->posxreffacturefourn-$this->posxup-0.8, 3, $object->lines[$i]->ref_supplier, 0, 'L', 0); - + // ref facture fourn $pdf->SetXY($this->posxreffacture, $curY); $pdf->MultiCell($this->posxreffacture-$this->posxup-0.8, 3, $object->lines[$i]->ref, 0, 'L', 0); - + // type $pdf->SetXY($this->posxtype, $curY); $pdf->MultiCell($this->posxtype-$this->posxup-0.8, 3, $object->lines[$i]->type, 0, 'L', 0); @@ -348,15 +346,15 @@ class pdf_standard extends ModelePDFSuppliersPayments // Total ht $pdf->SetXY($this->posxtotalht, $curY); $pdf->MultiCell($this->posxtotalht-$this->posxup-0.8, 3, price($object->lines[$i]->total_ht), 0, 'R', 0); - + // Total tva $pdf->SetXY($this->posxtva, $curY); $pdf->MultiCell($this->posxtva-$this->posxup-0.8, 3, price($object->lines[$i]->total_tva), 0, 'R', 0); - + // Total TTC line $pdf->SetXY($this->posxtotalttc, $curY); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxtotalttc, 3, price($object->lines[$i]->total_ttc), 0, 'R', 0); - + // Add line if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) @@ -421,7 +419,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Affiche zone cheèque $posy=$this->_tableau_cheque($pdf, $object, $bottomlasttab, $outputlangs); - + // Affiche zone totaux //$posy=$this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); @@ -443,7 +441,7 @@ class pdf_standard extends ModelePDFSuppliersPayments @chmod($file, octdec($conf->global->MAIN_UMASK)); $this->result = array('fullpath'=>$file); - + return 1; // Pas d'erreur } else @@ -476,45 +474,45 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('','', $default_font_size - 1); $pdf->SetFillColor(255,255,255); - + // N° payment $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(30, 4, 'N° '.$outputlangs->transnoentities("Payment"), 0, 'L', 1); - + // Ref payment $pdf->SetXY($this->marge_gauche + 30, $posy); $pdf->MultiCell(50, 4, $object->ref, 0, 'L', 1); - + // Total payments $pdf->SetXY($this->page_largeur - $this->marge_droite - 50, $posy); $pdf->MultiCell(50, 4, price($object->montant), 0, 'R', 1); $posy += 20; - + // translate amount $currency = $conf->currency; $translateinletter = strtoupper(dol_convertToWord($object->montant,$outputlangs,$currency)); $pdf->SetXY($this->marge_gauche + 50, $posy); $pdf->MultiCell(90, 8, $translateinletter, 0, 'L', 1); $posy += 8; - + // To $pdf->SetXY($this->marge_gauche + 50, $posy); $pdf->MultiCell(150, 4, $object->thirdparty->nom, 0, 'L', 1); - + $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy); $pdf->MultiCell(35, 4, str_pad(price($object->montant). ' '.$currency,18,'*',STR_PAD_LEFT), 0, 'R', 1); $posy += 10; - - + + // City $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy); $pdf->MultiCell(150, 4, $mysoc->town, 0, 'L', 1); $posy += 4; - + // Date $pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy); $pdf->MultiCell(150, 4, date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"), 0, 'L', 1); - + } @@ -549,7 +547,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $titre = strtoupper($mysoc->town).', le '.date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3) - 60, $tab_top-6); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); - + $titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); @@ -682,17 +680,17 @@ class pdf_standard extends ModelePDFSuppliersPayments // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); - // Show sender + // Show payer $posy=42; $posx=$this->marge_gauche; if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; $hautcadre=40; -/* + // Show sender frame $pdf->SetTextColor(0,0,0); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY($posx,$posy-5); - $pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L'); + $pdf->MultiCell(66,5, $outputlangs->transnoentities("PayedBy").":", 0, 'L'); $pdf->SetXY($posx,$posy); $pdf->SetFillColor(230,230,230); $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); @@ -709,28 +707,12 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('','', $default_font_size - 1); $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); -*/ - - // If BILLING contact defined on invoice, we use it - $usecontact=false; - $arrayidcontact=$object->getIdContact('internal','BILLING'); - if (count($arrayidcontact) > 0) - { - $usecontact=true; - $result=$object->fetch_contact($arrayidcontact[0]); - } - - //Recipient name - // On peut utiliser le nom de la societe du contact - if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) { - $thirdparty = $object->contact; - } else { - $thirdparty = $object->thirdparty; - } + // Payed + $thirdparty = $object->thirdparty; $carac_client_name= pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client=pdf_build_address($outputlangs,$this->emetteur,$thirdparty,((!empty($object->contact))?$object->contact:null),$usecontact,'target',$object); + $carac_client=pdf_build_address($outputlangs,$this->emetteur,$mysoc,((!empty($object->contact))?$object->contact:null),$usecontact,'target',$object); // Show recipient $widthrecbox=90; @@ -743,7 +725,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetTextColor(0,0,0); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetXY($posx+2,$posy-5); - $pdf->MultiCell($widthrecbox, 5, "",0,'L'); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("PayedTo").":",0,'L'); $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); // Show recipient name diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 7a8fbc253c6..6d402598284 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -738,17 +738,18 @@ class PaiementFourn extends Paiement return $way; } - + + /** - * Load the third party of object, from id into this->thirdparty - * - * @param int $force_thirdparty_id Force thirdparty id - * @return int <0 if KO, >0 if OK - */ - function fetch_thirdparty($force_thirdparty_id=0) - { + * Load the third party of object, from id into this->thirdparty + * + * @param int $force_thirdparty_id Force thirdparty id + * @return int <0 if KO, >0 if OK + */ + function fetch_thirdparty($force_thirdparty_id=0) + { require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; - + if (empty($force_thirdparty_id)) { $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first supplier invoice to get him @@ -761,7 +762,8 @@ class PaiementFourn extends Paiement } } } - + return parent::fetch_thirdparty($force_thirdparty_id); - } + } + } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index ee587b07924..761d5d591e3 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -686,7 +686,7 @@ if (empty($reshook)) if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { $lines[$i]->fetch_optionals($lines[$i]->rowid); } - + // Dates // TODO mutualiser $date_start=$lines[$i]->date_debut_prevue; @@ -2439,6 +2439,8 @@ else { $num = $db->num_rows($result); $i = 0; + + print '
'; print ''; print ''; print ''; @@ -2449,7 +2451,6 @@ else print ''; print ''; - $var=false; if ($num > 0) { while ($i < $num) @@ -2658,6 +2659,7 @@ else } print '
' . ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . ' 
'; + print '
'; print ''; print ''; @@ -2712,8 +2714,6 @@ else { if ($action != 'editline') { - $var = true; - // Add free products/services $object->formAddObjectLine(1, $societe, $mysoc); diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 6023e7c050a..529feb86897 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -370,32 +370,36 @@ if ($result > 0) } print ''; - /* + print '
'; // Documents generes - $ref=dol_sanitizeFileName($object->ref); - $filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id; - $genallowed=$user->rights->fournisseur->facture->lire; - $delallowed=$user->rights->fournisseur->facture->creer; - $modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)?'':$conf->global->SUPPLIER_PAYMENT_ADDON_PDF)); - print $formfile->showdocuments('supplier_payment',$ref,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang); - $somethingshown=$formfile->numoffiles; + include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php'; + $modellist=ModelePDFSuppliersPayments::liste_modeles($db); + if (is_array($modellist)) + { + $ref=dol_sanitizeFileName($object->ref); + $filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref); + $urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id; + $genallowed=$user->rights->fournisseur->facture->lire; + $delallowed=$user->rights->fournisseur->facture->creer; + $modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)?'':$conf->global->SUPPLIER_PAYMENT_ADDON_PDF)); + + print $formfile->showdocuments('supplier_payment',$ref,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang); + $somethingshown=$formfile->numoffiles; + } print '
'; - //print ''; //print '
'; // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + /*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions=new FormActions($db); $somethingshown = $formactions->showactions($object,'supplier_payment',$socid,1,'listaction'.($genallowed?'largetitle':'')); + */ print '
'; - //print ''; - */ } else { diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index d3ff5bd6e17..ae74a1161fb 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -25,6 +25,10 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY fk_pcg_version VARCHAR(20) CHARACTER SET utf8; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY fk_pcg_version VARCHAR(20) COLLATE utf8_unicode_ci; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_system MODIFY pcg_version VARCHAR(20) CHARACTER SET utf8; +-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_system MODIFY pcg_version VARCHAR(20) COLLATE utf8_unicode_ci; -- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8; -- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci; -- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 1396fbfb4cf..3f4fa2d2910 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1036,10 +1036,13 @@ if ($ok && GETPOST('force_utf8_on_tables','alpha')) print ''; print $table; $sql='ALTER TABLE '.$table.' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci'; + print $sql; if (GETPOST('force_utf8_on_tables','alpha') == 'confirmed') { - $db->query($sql); + $resql = $db->query($sql); + print ' - Done ('.$resql.')'; } + else print ' - Disabled'; print ''; } } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index a54ecbc0023..5027e56b858 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -178,6 +178,7 @@ ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'? ConfirmClassifyPaidPartially=Are you sure you want to change invoice %s to status paid? ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What are reasons for you to close this invoice? ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I regularise the VAT with a credit note. +ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid (%s %s) is a discount granted because payment was made before term. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I accept to lose the VAT on this discount. ConfirmClassifyPaidPartiallyReasonDiscountVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. ConfirmClassifyPaidPartiallyReasonBadCustomer=Bad customer diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index fd9f637cd0d..f554bdf11a9 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -912,3 +912,5 @@ CommentPage=Comments space CommentAdded=Comment added CommentDeleted=Comment deleted Everybody=Everybody +PayedBy=Payed by +PayedTo=Payed to diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index b044471e3e1..747d423f402 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -140,14 +140,17 @@ if (!empty($action) && empty($cancel)) { $action = ''; } + /* * View */ +$form = new Form($db); + llxHeader("","",$langs->trans("CardProduct".$product->type)); -print load_fiche_titre($langs->trans("DynamicPriceConfiguration")); -$form = new Form($db); +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("DynamicPriceConfiguration"), $linkback, 'title_setup'); print $langs->trans("DynamicPriceDesc").'
'; print '
'; diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index e3e5a2a4efb..cb22f00e4d4 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -326,12 +326,14 @@ if ($id) $onlyopenedproject=1; // or -1 $morewherefilter=''; -if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); -if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); -if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); + +if ($search_project_ref) $morewherefilter.=natural_search("p.ref", $search_project_ref); +if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); +if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); +if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); $tasksarray=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. -if ($morewherefilter) // Get all task with no filter so we can show total of time spent for not visible tasks +if ($morewherefilter) // Get all task without any filter, so we can show total of time spent for not visible tasks { $tasksarraywithoutfilter=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } @@ -499,7 +501,12 @@ $isavailable[$daytoparse]=$isavailablefordayanduser; // in projectLinesPerWeek if (count($tasksarray) > 0) { + //var_dump($tasksarray); // contains only selected tasks + //var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter) + //var_dump($tasksrole); + $j=0; + $level=0; $totalforvisibletasks = projectLinesPerDay($j, 0, $usertoprocess, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $daytoparse, $isavailable, 0); //var_dump($totalforvisibletasks); @@ -518,7 +525,6 @@ if (count($tasksarray) > 0) $totalforeachday=array(); foreach($listofdistinctprojectid as $tmpprojectid) { - $lineother=''; $projectstatic->id=$tmpprojectid; $projectstatic->loadTimeSpent($daytoparse, 0, $usertoprocess->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week for ($idw = 0; $idw < 7; $idw++) @@ -527,15 +533,25 @@ if (count($tasksarray) > 0) $totalforeachday[$tmpday]+=$projectstatic->weekWorkLoad[$tmpday]; } } - $lineother=''; //var_dump($totalforeachday); + // Is there a diff between selected/filtered tasks and all tasks ? + $isdiff = 0; + if (count($totalforeachday)) + { + $timeonothertasks=($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]); + if ($timeonothertasks) + { + $isdiff=1; + } + } + $colspan = 8; // There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user - if (count($totalforeachday)) + if ($isdiff) { - print ''; + print ''; print ''; print $langs->trans("OtherFilteredTasks"); print ''; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 023ccd611dd..3efadd56a48 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -41,7 +41,6 @@ $mode=GETPOST("mode",'alpha'); $id=GETPOST('id','int'); $taskid=GETPOST('taskid','int'); - $mine=0; if ($mode == 'mine') $mine=1; @@ -328,12 +327,14 @@ if ($id) $onlyopenedproject=1; // or -1 $morewherefilter=''; -if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); -if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); -if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); + +if ($search_project_ref) $morewherefilter.=natural_search("p.ref", $search_project_ref); +if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_ref); +if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); +if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); $tasksarray=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. -if ($morewherefilter) // Get all task with no filter so we can show total of time spent for not visible tasks +if ($morewherefilter) // Get all task without any filter, so we can show total of time spent for not visible tasks { $tasksarraywithoutfilter=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } @@ -514,7 +515,8 @@ $restrictviewformytask=(empty($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED if (count($tasksarray) > 0) { - //var_dump($tasksarray); + //var_dump($tasksarray); // contains only selected tasks + //var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter) //var_dump($tasksrole); $j=0; @@ -537,7 +539,6 @@ if (count($tasksarray) > 0) $totalforeachday=array(); foreach($listofdistinctprojectid as $tmpprojectid) { - $lineother=''; $projectstatic->id=$tmpprojectid; $projectstatic->loadTimeSpent($firstdaytoshow, 0, $usertoprocess->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week for ($idw = 0; $idw < 7; $idw++) @@ -546,15 +547,32 @@ if (count($tasksarray) > 0) $totalforeachday[$tmpday]+=$projectstatic->weekWorkLoad[$tmpday]; } } - $lineother=''; + //var_dump($totalforeachday); + //var_dump($totalforvisibletasks); + + // Is there a diff between selected/filtered tasks and all tasks ? + $isdiff = 0; + if (count($totalforeachday)) + { + for ($idw = 0; $idw < 7; $idw++) + { + $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd'); + $timeonothertasks=($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]); + if ($timeonothertasks) + { + $isdiff=1; + break; + } + } + } $colspan=7; // There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user - if (count($totalforeachday)) + if ($isdiff) { - print ''; + print ''; print ''; print $langs->trans("OtherFilteredTasks"); print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 897149def5b..def3e357ac1 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1489,7 +1489,7 @@ div.tmenuleft margin-top: 0px; dol_optimize_smallscreen)) { ?> width: 5px; - background: url() 0 -6px no-repeat; + /* background: url() 0 -6px no-repeat; */ height: 26px; @@ -3125,15 +3125,29 @@ div.ok { color: #114466; } +/* Info admin */ +div.info { + border-: solid 5px #87cfd2; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 0.5em 0em 0.5em 0em; + background: #eff8fc; +} + /* Warning message */ div.warning { - color: #302020; - padding: 0.3em 0.3em 0.3em 0.3em; - margin: 0.5em 0em 0.5em 0em; - border: 2px solid #805000; - -webkit-border-radius: 4px; - border-radius: 4px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + border-: solid 5px #f2cf87; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 0.5em 0em 0.5em 0em; + background: #fcf8e3; +} +div.warning a, div.info a, div.error a { + color: rgb(); } /* Error message */ @@ -3141,19 +3155,6 @@ div.error { background: #EFCFCF; } -/* Info admin */ -div.info { - color: #fff; - padding: 0.4em 0.4em 0.4em 0.4em; - margin: 0.5em 0em 0.5em 0em; - -webkit-border-radius: 4px; - border-radius: 4px; - background: #798080; -} - -div.warning a, div.info a, div.error a { - color: rgb(); -} /* * Liens Payes/Non payes @@ -3323,20 +3324,19 @@ div#card-errors { /* ============================================================================== */ table.valid { - border-top: solid 1px #E6E6E6; - border-: solid 1px #E6E6E6; - border-: solid 1px #444444; - border-bottom: solid 1px #555555; - padding-top: 0px; - padding-left: 0px; - padding-right: 0px; - padding-bottom: 0px; + /* border-top: solid 1px #E6E6E6; */ + border-: solid 5px #f2cf87; + /* border-: solid 1px #444444; + border-bottom: solid 1px #555555; */ + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 4px; margin: 0px 0px; - background: #D5BAA8; + background: #fcf8e3; } .validtitre { - background: #D5BAA8; font-weight: bold; } @@ -4948,7 +4948,7 @@ div.tabsElem a.tab { /* nboftopmenuentries = , fontsize= */ /* rule to reduce top menu - 1st reduction */ -@media only screen and (max-width: px) /* reduction 1 */ +@media only screen and (max-width: px) /* reduction 1 */ { div.tmenucenter { width: px; /* size of viewport */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 183efa2c828..0d3359364e3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3181,17 +3181,29 @@ div.ok { color: #114466; } +/* Info admin */ +div.info { + border-: solid 5px #87cfd2; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 0.5em 0em 0.5em 0em; + background: #eff8fc; +} + /* Warning message */ div.warning { - color: #302020; - padding: 0.3em 0.3em 0.3em 0.3em; - margin: 0.5em 0em 0.5em 0em; - /* border: 1px solid #e0d0b0; */ - border: 2px solid #805000 - -webkit-border-radius: 3px; - border-radius: 3px; - /* background: #EFDF9A; */ - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + border-: solid 5px #f2cf87; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 0.5em 0em 0.5em 0em; + background: #fcf8e3; +} +div.warning a, div.info a, div.error a { + color: rgb(); } /* Error message */ @@ -3205,19 +3217,6 @@ div.error { background: #EFCFCF; } -/* Info admin */ -div.info { - color: #fff; - padding: 0.4em 0.4em 0.4em 0.4em; - margin: 0.5em 0em 0.5em 0em; - -webkit-border-radius: 4px; - border-radius: 4px; - background: #989; -} - -div.warning a, div.info a, div.error a { - color: rgb(); -} /* * Liens Payes/Non payes @@ -3378,20 +3377,19 @@ div#card-errors { /* ============================================================================== */ table.valid { - border-top: solid 1px #E6E6E6; - border-: solid 1px #E6E6E6; - border-: solid 1px #444444; - border-bottom: solid 1px #555555; - padding-top: 0px; - padding-left: 0px; - padding-right: 0px; - padding-bottom: 0px; + /* border-top: solid 1px #E6E6E6; */ + border-: solid 5px #f2cf87; + /* border-: solid 1px #444444; + border-bottom: solid 1px #555555; */ + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 4px; margin: 0px 0px; - background: #D5BAA8; + background: #fcf8e3; } .validtitre { - background: #D5BAA8; font-weight: bold; }