diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 00a61a7ce7e..b0de5f5807f 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -287,17 +287,17 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' if ($search_description) { $param .= '&search_description='.urlencode($search_description); } - if ($search_start_dt) { - $param .= '&search_start_dt='.urlencode($search_start_dt); + if (dol_strlen($search_dt_start) > 0) { + $param .= '&search_start_dtmonth='.GETPOST('search_start_dtmonth', 'int').'&search_start_dtday='.GETPOST('search_start_dtday', 'int').'&search_start_dtyear='.GETPOST('search_start_dtyear', 'int'); } - if ($search_end_dt) { - $param .= '&search_end_dt='.urlencode($search_end_dt); + if (dol_strlen($search_dt_end) > 0) { + $param .= '&search_end_dtmonth='.GETPOST('search_end_dtmonth', 'int').'&search_end_dtday='.GETPOST('search_end_dtday', 'int').'&search_end_dtyear='.GETPOST('search_end_dtyear', 'int'); } - if ($search_start_dv) { - $param .= '&search_start_dv='.urlencode($search_start_dv); + if (dol_strlen($search_dv_start) > 0) { + $param .= '&search_start_dvmonth='.GETPOST('search_start_dvmonth', 'int').'&search_start_dvday='.GETPOST('search_start_dvday', 'int').'&search_start_dvyear='.GETPOST('search_start_dvyear', 'int'); } - if ($search_end_dv) { - $param .= '&search_end_dv='.urlencode($search_end_dv); + if (dol_strlen($search_dv_end) > 0) { + $param .= '&search_end_dvmonth='.GETPOST('search_end_dvmonth', 'int').'&search_end_dvday='.GETPOST('search_end_dvday', 'int').'&search_end_dvyear='.GETPOST('search_end_dvyear', 'int'); } if ($search_type) { $param .= '&search_type='.urlencode($search_type); @@ -622,14 +622,14 @@ if ($search_thirdparty_user) { $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; $sql.= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; - $sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1)."))"; + $sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; $sql.= " OR b.rowid IN "; $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; $sql.= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; $sql.= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); - $sql.= ")"; + $sql.= "))"; } if ($search_description) { $search_description_to_use = $search_description; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2157dd3213d..c7376f961f8 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4104,10 +4104,10 @@ if ($action == 'create') { } // Confirmation du classement paye - if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } - if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -5436,7 +5436,8 @@ if ($action == 'create') { } } - $sumofpayment = $object->getSommePaiement(); + $sumofpayment = $totalpaye; + $sumofpaymentall = $totalpaye + $totalcreditnotes + $totaldeposits; // Reverse back money or convert to reduction if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_SITUATION) { @@ -5460,8 +5461,8 @@ if ($action == 'create') { print ''.$langs->trans('ConvertToReduc').''; } // For deposit invoice - if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > 0 && empty($discount->id)) { - if (price2num($object->total_ttc, 'MT') == price2num($sumofpayment, 'MT')) { + if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) { + if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT')) { // We can close a down payment only if paid amount is same than amount of down payment (by definition) print ''.$langs->trans('ConvertToReduc').''; } else { @@ -5472,12 +5473,12 @@ if ($action == 'create') { // Classify paid if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercanissuepayment && ( - ($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) || + ($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) && $object->total_ttc == $resteapayer))) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0) || ($object->type == Facture::TYPE_DEPOSIT && $object->total_ttc > 0) ) ) { - if ($object->type == Facture::TYPE_DEPOSIT && price2num($object->total_ttc, 'MT') != price2num($sumofpayment, 'MT')) { + if ($object->type == Facture::TYPE_DEPOSIT && price2num($object->total_ttc, 'MT') != price2num($sumofpaymentall, 'MT')) { // We can close a down payment only if paid amount is same than amount of down payment (by definition) print ''.$langs->trans('ClassifyPaid').''; } else { @@ -5486,7 +5487,7 @@ if ($action == 'create') { } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc) && $usercanissuepayment) { + if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) || $resteapayer != $object->total_ttc) && $usercanissuepayment) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 913c0cb768e..5f161f88bfb 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -657,8 +657,8 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. // If we want one invoice per order or if there is no first invoice yet for this thirdparty. $objecttmp->socid = $cmd->socid; $objecttmp->type = $objecttmp::TYPE_STANDARD; - $objecttmp->cond_reglement_id = ($cmd->cond_reglement_id || $cmd->thirdparty->cond_reglement_id); - $objecttmp->mode_reglement_id = ($cmd->mode_reglement_id || $cmd->thirdparty->mode_reglement_id); + $objecttmp->cond_reglement_id = !empty($cmd->cond_reglement_id) ? $cmd->cond_reglement_id : $cmd->thirdparty->cond_reglement_id; + $objecttmp->mode_reglement_id = !empty($cmd->mode_reglement_id) ? $cmd->mode_reglement_id : $cmd->thirdparty->mode_reglement_id; $objecttmp->fk_project = $cmd->fk_project; $objecttmp->multicurrency_code = $cmd->multicurrency_code; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index ffcfef61a6e..5f069775fad 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -403,7 +403,7 @@ class modCommande extends DolibarrModules } // Add extra fields - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commandedet' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'commandedet' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 8e0fd6ea126..0f730f773bb 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -541,7 +541,7 @@ class modFournisseur extends DolibarrModules } // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { @@ -628,7 +628,7 @@ class modFournisseur extends DolibarrModules } // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { @@ -717,7 +717,7 @@ class modFournisseur extends DolibarrModules // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { @@ -793,7 +793,7 @@ class modFournisseur extends DolibarrModules } // Add extra fields - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index f72dc00cfaf..d1c1906d4a6 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -799,7 +799,7 @@ class modProduct extends DolibarrModules // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product_fournisseur_price' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'product_fournisseur_price' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { // This can fail when class is used on old database (during migration for example) while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 1374e70d6d4..53647db5dae 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -302,7 +302,7 @@ class modPropale extends DolibarrModules } // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'propal' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'propal' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { @@ -386,7 +386,7 @@ class modPropale extends DolibarrModules } // Add extra fields $import_extrafield_sample = array(); - $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'propaldet' AND entity IN (0, ".$conf->entity.")"; + $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'propaldet' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 269dc36ddd4..a202e459e6d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2424,7 +2424,7 @@ class FactureFournisseur extends CommonInvoice $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= ' WHERE ff.paye=0'; - $sql .= ' AND ff.fk_statut > 0'; + $sql .= ' AND ff.fk_statut = '.self::STATUS_VALIDATED; $sql .= " AND ff.entity = ".$conf->entity; if ($user->socid) { $sql .= ' AND ff.fk_soc = '.((int) $user->socid); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index df9e46b466b..4c634e1c1db 100755 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2566,11 +2566,11 @@ if ($action == 'create') { } // Confirmation set paid - if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $resteapayer == $object->total_ttc))) { + if ($action == 'paid' && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) && $resteapayer == $object->total_ttc))) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } - if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $resteapayer != $object->total_ttc)) { + if ($action == 'paid' && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) || $resteapayer != $object->total_ttc)) { $close = array(); // Code $i = 0; @@ -3504,16 +3504,16 @@ if ($action == 'create') { // Classify paid if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && ( - ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) || + ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && ($resteapayer <= 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) && $object->total_ttc == $resteapayer))) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0) || - ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) && $object->total_ttc == $resteapayer))) + ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->total_ttc > 0 && ($resteapayer == 0 || (!empty($conf->global->SUPPLIER_INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) && $object->total_ttc == $resteapayer))) ) ) { print ''.$langs->trans('ClassifyPaid').''; } // Classify 'closed not completely paid' (possible if validated and not yet filed paid) - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_ADD_PAYMENT_EVEN_IF_ALREADY_PAID) || $object->total_ttc != $resteapayer)) { + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0 && (empty($conf->global->SUPPLIER_INVOICE_CAN_SET_PAID_EVEN_IF_PARTIALLY_PAID) || $object->total_ttc != $resteapayer)) { if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; diff --git a/htdocs/install/mysql/data/llx_accounting_account_de.sql b/htdocs/install/mysql/data/llx_accounting_account_de.sql index d1b6b00f800..0165c3ec06e 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_de.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_de.sql @@ -2739,21 +2739,21 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3866, 'SKR04', 'Anlagevermögen', 280, 3854, 'Außenanlagen für Geschäfts-, Fabrik- und andere Bauten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3867, 'SKR04', 'Anlagevermögen', 285, 3854, 'Hof- und Wegbefestigungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3868, 'SKR04', 'Anlagevermögen', 290, 3854, 'Einrichtungen für Geschäfts-. Fabrik- und andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3869, 'SKR04', 'Anlagevermögen', 300, 3854, Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3870, 'SKR04', 'Anlagevermögen', 305, 3854, Garagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3871, 'SKR04', 'Anlagevermögen', 310, 3854, Außenanlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3872, 'SKR04', 'Anlagevermögen', 315, 3854, Hof- und Wegbefestigungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3873, 'SKR04', 'Anlagevermögen', 320, 3854, Einrichtungen für Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3874, 'SKR04', 'Anlagevermögen', 329, 3854, Gebäudeteil des häuslichen Arbeitszimmers'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3875, 'SKR04', 'Anlagevermögen', 330, 3854, Bauten auf fremden Grundstücken'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3876, 'SKR04', 'Anlagevermögen', 340, 3854, Geschäftsbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3877, 'SKR04', 'Anlagevermögen', 350, 3854, Fabrikbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3878, 'SKR04', 'Anlagevermögen', 360, 3854, Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3879, 'SKR04', 'Anlagevermögen', 370, 3854, Andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3880, 'SKR04', 'Anlagevermögen', 380, 3854, Garagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3881, 'SKR04', 'Anlagevermögen', 390, 3854, Außenanlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3882, 'SKR04', 'Anlagevermögen', 395, 3854, Hof- und Wegbefestigungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3883, 'SKR04', 'Anlagevermögen', 398, 3854, Einrichtungen für Geschäfts-. Fabrik-, Wohn- und andere Bauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3869, 'SKR04', 'Anlagevermögen', 300, 3854, 'Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3870, 'SKR04', 'Anlagevermögen', 305, 3854, 'Garagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3871, 'SKR04', 'Anlagevermögen', 310, 3854, 'Außenanlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3872, 'SKR04', 'Anlagevermögen', 315, 3854, 'Hof- und Wegbefestigungen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3873, 'SKR04', 'Anlagevermögen', 320, 3854, 'Einrichtungen für Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3874, 'SKR04', 'Anlagevermögen', 329, 3854, 'Gebäudeteil des häuslichen Arbeitszimmers'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3875, 'SKR04', 'Anlagevermögen', 330, 3854, 'Bauten auf fremden Grundstücken'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3876, 'SKR04', 'Anlagevermögen', 340, 3854, 'Geschäftsbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3877, 'SKR04', 'Anlagevermögen', 350, 3854, 'Fabrikbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3878, 'SKR04', 'Anlagevermögen', 360, 3854, 'Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3879, 'SKR04', 'Anlagevermögen', 370, 3854, 'Andere Bauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3880, 'SKR04', 'Anlagevermögen', 380, 3854, 'Garagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3881, 'SKR04', 'Anlagevermögen', 390, 3854, 'Außenanlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3882, 'SKR04', 'Anlagevermögen', 395, 3854, 'Hof- und Wegbefestigungen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3883, 'SKR04', 'Anlagevermögen', 398, 3854, 'Einrichtungen für Geschäfts-. Fabrik-, Wohn- und andere Bauten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3884, 'SKR04', 'Anlagevermögen', 400, 0, 'Technische Anlagen und Maschinen'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3885, 'SKR04', 'Anlagevermögen', 420, 3884, 'Technische Anlagen'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3886, 'SKR04', 'Anlagevermögen', 440, 3884, 'Maschinen'); diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 6836585285c..5348ea32520 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -147,11 +147,11 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; if ($action == 'updateMask') { - $maskconstorder = GETPOST('maskconstorder', 'alpha'); - $maskorder = GETPOST('maskorder', 'alpha'); + $maskconst = GETPOST('maskconst', 'alpha'); + $maskvalue = GETPOST('maskvalue', 'alpha'); - if ($maskconstorder) { - $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; } diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index b7fd7085783..0573edc6b2a 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -68,8 +68,8 @@ class mod_myobject_advanced extends ModeleNumRefMyObject $texte .= '
'; $texte .= ''; $texte .= ''; - $texte .= ''; - $texte .= ''; + $texte .= ''; + $texte .= '
'; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("MyObject"), $langs->transnoentities("MyObject")); $tooltip .= $langs->trans("GenericMaskCodes2"); @@ -79,10 +79,8 @@ class mod_myobject_advanced extends ModeleNumRefMyObject // Parametrage du prefix $texte .= ''; - $texte .= ''; - - $texte .= ''; - + $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '.$form->textwithpicto('', $tooltip, 1, 1).' 
'; diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index b60a4b1586c..ac6fc37591a 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -260,6 +260,8 @@ if (empty($reshook)) { $nuser->employee = 1; $nuser->firstname = $object->firstname; $nuser->lastname = $object->lastname; + $nuser->email = ''; + $nuser->personal_email = $object->email; $nuser->personal_mobile = $object->phone; $nuser->birth = $object->date_birth; $nuser->salary = $object->remuneration_proposed; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 40da31fa619..dbb380bd405 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1331,7 +1331,7 @@ if (!empty($arrayfields['s.tva_intra']['checked'])) { print_liste_field_titre($arrayfields['s.tva_intra']['label'], $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'nowrap '); } if (!empty($arrayfields['customerorsupplier']['checked'])) { - print_liste_field_titre(''); // type of customer + print_liste_field_titre($arrayfields['customerorsupplier']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center '); // type of customer } if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) { print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'], $_SERVER["PHP_SELF"], "s.fk_prospectlevel", "", $param, '', $sortfield, $sortorder, 'center '); @@ -1342,7 +1342,6 @@ if (!empty($arrayfields['s.fk_stcomm']['checked'])) { if (!empty($arrayfields['s2.nom']['checked'])) { print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER["PHP_SELF"], "s2.nom", "", $param, '', $sortfield, $sortorder, 'center '); } - // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields