diff --git a/ChangeLog b/ChangeLog index 4fc1a613681..e205c90cda5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ The following changes may create regressions for some external modules, but were be set (not allowed by PHP 8.2). A module can already return an array with key 'no_button_delete', 'no_button_edit', 'no_button_copy' for same purpose. * The old function dol_bc($var, $moreclass = '') has been removed. If you called it, just stop to call it. * The trigger code CATEGORY_LINK and CATEGORY_UNLINK has been replaced with code CATEGORY_MODIFY. You can read ->context['linkto'] or ->context['unlinkoff' to detect we want to make a link or unlink. +* The property ->domiciliation and ->propio on bank accounts has been deprecated and replaced with property ->address and ->owner_name ***** ChangeLog for 20.0.1 compared to 20.0.0 ***** diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 2a5253869d0..aac8fbc9e47 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -623,6 +623,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Common attributes //$keyforbreak='fieldkeytoswithonsecondcolumn'; + $nounderbanner = 1; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; // Other attributes @@ -639,7 +640,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Filters print '
| '.img_picto('', 'filter', 'class="pictofixedwidth opacitymedium"').$form->textwithpicto($langs->trans("Filters"), $langs->trans("EmailCollectorFilterDesc")).' | '; print ' | |
| '.$langs->trans("Ref").' | '; - print ''; // Label print ' | |
| '.$langs->trans("Label").' | '; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index ef4d39c06f7..91f1a0644cd 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -737,20 +737,11 @@ class Account extends CommonObject if (empty($balance)) { $balance = 0; } - if (empty($this->address && !empty($this->domiciliation))) { - dol_syslog(get_class($this)."::create domiciliation is deprecated use address", LOG_NOTICE); - $this->address = $this->domiciliation; - } if (empty($this->status && !empty($this->clos))) { dol_syslog(get_class($this)."::create clos is deprecated use status", LOG_NOTICE); $this->status = $this->clos; } - if (empty($this->address && !empty($this->domiciliation))) { - dol_syslog(get_class($this)."::create domiciliation is deprecated use address", LOG_NOTICE); - $this->address = $this->domiciliation; - } - // Load the library to validate/check a BAN account require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; @@ -804,7 +795,7 @@ class Account extends CommonObject $sql .= ", '".$this->db->escape($this->iban)."'"; $sql .= ", '".$this->db->escape($this->address)."'"; $sql .= ", ".((int) $this->pti_in_ctti); - $sql .= ", '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'"; + $sql .= ", '".$this->db->escape($this->owner_name)."'"; $sql .= ", '".$this->db->escape($this->owner_address)."'"; $sql .= ", '".$this->db->escape($this->owner_zip)."'"; $sql .= ", '".$this->db->escape($this->owner_town)."'"; @@ -928,7 +919,7 @@ class Account extends CommonObject $sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'"; $sql .= ",domiciliation='".$this->db->escape($this->address)."'"; $sql .= ",pti_in_ctti=".((int) $this->pti_in_ctti); - $sql .= ",proprio = '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'"; + $sql .= ",proprio = '".$this->db->escape($this->owner_name)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= ",owner_zip = '".$this->db->escape($this->owner_zip)."'"; $sql .= ",owner_town = '".$this->db->escape($this->owner_town)."'"; @@ -1035,8 +1026,8 @@ class Account extends CommonObject $sql .= ",cle_rib='".$this->db->escape($this->cle_rib)."'"; $sql .= ",bic='".$this->db->escape($this->bic)."'"; $sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'"; - $sql .= ",domiciliation='".$this->db->escape($this->address ? $this->address : $this->domiciliation)."'"; - $sql .= ",proprio = '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'"; + $sql .= ",domiciliation='".$this->db->escape($this->address)."'"; + $sql .= ",proprio = '".$this->db->escape($this->owner_name)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= ",owner_zip = '".$this->db->escape($this->owner_zip)."'"; $sql .= ",owner_town = '".$this->db->escape($this->owner_town)."'"; @@ -1108,7 +1099,7 @@ class Account extends CommonObject $this->courant = $obj->type; $this->bank = $obj->bank; $this->clos = $obj->status; - $this->status = $obj->status; + $this->status = $obj->status; $this->rappro = $obj->rappro; $this->url = $obj->url; @@ -1118,16 +1109,17 @@ class Account extends CommonObject $this->cle_rib = $obj->cle_rib; $this->bic = $obj->bic; $this->iban = $obj->iban; - $this->domiciliation = $obj->address; $this->address = $obj->address; - $this->pti_in_ctti = $obj->pti_in_ctti; - $this->proprio = $obj->owner_name; + $this->owner_name = $obj->owner_name; + $this->proprio = $this->owner_name; $this->owner_address = $obj->owner_address; $this->owner_zip = $obj->owner_zip; $this->owner_town = $obj->owner_town; $this->owner_country_id = $obj->owner_country_id; + $this->pti_in_ctti = $obj->pti_in_ctti; + $this->state_id = $obj->state_id; $this->state_code = $obj->state_code; $this->state = $obj->state; @@ -1961,7 +1953,6 @@ class Account extends CommonObject $this->bank = 'MyBank'; $this->address = 'Rue de Paris'; - $this->proprio = 'Owner'; $this->owner_name = 'Owner'; $this->owner_address = 'Owner address'; $this->owner_zip = 'Owner zip'; diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 0e86ea1d235..54acfef3968 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1398,35 +1398,6 @@ if ($action == 'create') { } print '||
| '; @@ -1450,21 +1421,7 @@ if ($action == 'create') { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - // Note public - print ' | ||
| '; - print $form->editfieldkey($form->textwithpicto($langs->trans('NotePublic'), $htmltext, 1, 'help', '', 0, 2, 'notepublic'), 'note_public', $object->note_public, $object, $user->hasRight('facture', 'creer')); - print ' | '; - print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->hasRight('facture', 'creer'), 'textarea:'.ROWS_4.':90%', '', null, null, '', 1); - print ' | '; - print '|
| '; - print $form->editfieldkey($form->textwithpicto($langs->trans("NotePrivate"), $htmltext, 1, 'help', '', 0, 2, 'noteprivate'), 'note_private', $object->note_private, $object, $user->hasRight('facture', 'creer')); - print ' | '; - print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->hasRight('facture', 'creer'), 'textarea:'.ROWS_4.':90%', '', null, null, '', 1); - print ' | '; - print '|
| ';
diff --git a/htdocs/compta/facture/note-rec.php b/htdocs/compta/facture/note-rec.php
new file mode 100644
index 00000000000..03ad7f844b3
--- /dev/null
+++ b/htdocs/compta/facture/note-rec.php
@@ -0,0 +1,208 @@
+
+ * Copyright (C) 2004-2016 Laurent Destailleur '.$langs->trans("ErrorRecordNotFound").' ';
+ llxFooter();
+ exit;
+}
+
+
+if ($id > 0 ) {
+ $object = new FactureRec($db);
+ $object->fetch($id);
+
+ $object->fetch_thirdparty();
+
+ $head = invoice_rec_prepare_head($object);
+
+ $totalpaid = $object->getSommePaiement();
+
+ print dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill');
+
+ // Object card
+ // ------------------------------------------------------------
+ $linkback = ''.$langs->trans("BackToList").'';
+
+ $morehtmlref = '';
+ if ($action != 'editref') {
+ $morehtmlref .= $form->editfieldkey($object->ref, 'ref', $object->ref, $object, 0, '', '', 0, 2);
+ } else {
+ $morehtmlref .= $form->editfieldval('', 'ref', $object->ref, $object, 0, 'string');
+ }
+
+ $morehtmlref .= '';
+ // Thirdparty
+ $morehtmlref .= $object->thirdparty->getNomUrl(1);
+ // Project
+ if (isModEnabled('project')) {
+ $langs->load("projects");
+ $morehtmlref .= ' ';
+
+ $morehtmlstatus = '';
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlstatus);
+
+ print ''; + if (0) { + $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + } + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= $proj->getNomUrl(1); + if ($proj->title) { + $morehtmlref .= ' - '.dol_escape_htmltag($proj->title).''; + } + } + } + } + $morehtmlref .= ' ';
+ print '';
+
+
+ $cssclass = "titlefield";
+
+ // Help of substitution key
+ $dateexample = dol_now();
+ if (!empty($object->frequency) && !empty($object->date_when)) {
+ $dateexample = $object->date_when;
+ }
+
+ $substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object);
+
+ $substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%m') . ')';
+ $substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%m') . ')';
+ $substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%m') . ')';
+ $substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%B') . ')';
+ $substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%B') . ')';
+ $substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B') . ')';
+ $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'), '%Y') . ')';
+ $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%Y') . ')';
+ $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'), '%Y') . ')';
+ // Only on template invoices
+ $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(($object->date_when ? $object->date_when : dol_now()), 'dayhour') . ')';
+ $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree(($object->date_when ? $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour') . ')';
+ $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $object->nb_gen_done;
+ $substitutionarray['__INVOICE_COUNTER_MAX__'] = $object->nb_gen_max;
+
+ $htmltext = '' . $langs->trans("FollowingConstantsWillBeSubstituted") . ': '; + foreach ($substitutionarray as $key => $val) { + $htmltext .= $key . ' = ' . $langs->trans($val) . ' '; + } + $htmltext .= ''; + + $textNotePub = $form->textwithpicto($langs->trans('NotePublic'), $htmltext, 1, 'help', '', 0, 2, 'notepublic', 2); + $textNotePrive = $form->textwithpicto($langs->trans("NotePrivate"), $htmltext, 1, 'help', '', 0, 2, 'noteprivate'); + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 89919a8b1d5..5a4faa32e62 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1458,7 +1458,7 @@ class BonPrelevement extends CommonObject $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Example "FR78ZZZ123456" - $this->raison_sociale = $account->proprio; + $this->raison_sociale = $account->owner_name; } $this->factures = $factures_prev_id; $this->context['factures_prev'] = $factures_prev; @@ -2533,7 +2533,7 @@ class BonPrelevement extends CommonObject $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; - $this->raison_sociale = $account->proprio; + $this->raison_sociale = $account->owner_name; } // Get pending payments diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index 1324096d3d5..5771e4edbe9 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005-2012 Regis Houssin '."\n";
+ // Section to generate the form to upload a new file
+ $out = "\n".' '."\n";
+ if ($nooutput != 2) {
if (empty($title)) {
$title = $langs->trans("AttachANewFile");
}
if ($title != 'none') {
$out .= load_fiche_titre($title, '', '');
}
+ }
- if (empty($usewithoutform)) { // Try to avoid this and set instead the form by the caller.
- // Add a param as GET parameter to detect when POST were cleaned by PHP because a file larger than post_max_size
- $url .= (strpos($url, '?') === false ? '?' : '&').'uploadform=1';
+ if (empty($usewithoutform)) { // Try to avoid this and set instead the form by the caller.
+ // Add a param as GET parameter to detect when POST were cleaned by PHP because a file larger than post_max_size
+ $url .= (strpos($url, '?') === false ? '?' : '&').'uploadform=1';
- $out .= '';
- if (empty($sectionid)) {
- $out .= ' \n";
-
- if ($linkfiles) {
- $out .= "\n".''; - } + $out2 .= ' '."\n";
- $langs->load('link');
- $title = $langs->trans("LinkANewFile");
- $out .= load_fiche_titre($title, '', '');
-
- if (empty($usewithoutform)) {
- $out .= ' |