';
print "\n";
- if ($objp->paye == 1) { // If at least one invoice is paid, disable delete
+
+ // If at least one invoice is paid, disable delete. INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED Can be use for maintenance purpose. Never use this in production
+ if ($objp->paye == 1 && empty($conf->global->INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED)) {
$disable_delete = 1;
$title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
}
+
$total = $total + $objp->amount;
$i++;
}
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index a6157d2a26b..e4483258b92 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -129,7 +129,6 @@ if ($action == 'add' && !empty($permissiontoadd)) {
if (!$error) {
$result = $object->create($user);
- var_dump($object);exit;
if ($result > 0) {
// Creation OK
if ($conf->categorie->enabled && method_exists($object, 'setCategories')) {
@@ -298,6 +297,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) {
}
$result = $object->delete($user);
+
if ($result > 0) {
// Delete OK
setEventMessages("RecordDeleted", null, 'mesgs');
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index f63081660d6..004dc184fa9 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5324,7 +5324,7 @@ abstract class CommonObject
$ecmfile->gen_or_uploaded = 'generated';
$ecmfile->description = ''; // indexed content
$ecmfile->keywords = ''; // keyword content
- $ecmfile->src_object_type = $this->table_element.(empty($this->module) ? '' : '@'.$this->module);
+ $ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'.
$ecmfile->src_object_id = $this->id;
$result = $ecmfile->create($user);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 0d1d838aad4..03faffb941b 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1578,7 +1578,7 @@ class FormFile
*
* @param string $upload_dir Directory that was scanned. This directory will contains files into subdirs REF/files
* @param array $filearray Array of files loaded by dol_dir_list function before calling this function
- * @param string $modulepart Value for modulepart used by download wrapper
+ * @param string $modulepart Value for modulepart used by download wrapper. Value can be $object->table_name (that is 'myobject' or 'mymodule_myobject') or $object->element.'-'.$module (for compatibility purpose)
* @param string $param Parameters on sort links
* @param int $forcedownload Force to open dialog box "Save As" when clicking on file
* @param string $relativepath Relative path of docs (autodefined if not provided)
@@ -1742,7 +1742,8 @@ class FormFile
$id = 0;
$ref = '';
- // To show ref or specific information according to view to show (defined by $module)
+ // To show ref or specific information according to view to show (defined by $modulepart)
+ // $modulepart can be $object->table_name (that is 'mymodule_myobject') or $object->element.'-'.$module (for compatibility purpose)
$reg = array();
if ($modulepart == 'company' || $modulepart == 'tax') {
preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg);
@@ -1848,10 +1849,9 @@ class FormFile
// File
// Check if document source has external module part, if it the case use it for module part on document.php
- preg_match('/^[^@]*@([^@]*)$/', $modulepart.'@expertisemedical', $modulesuffix);
print '
';
}
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index 29c2aad9bd4..a9f1a669e52 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -37,6 +37,7 @@ ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-orde
ALTER TABLE llx_prelevement_facture CHANGE COLUMN fk_facture_foun fk_facture_fourn integer NULL;
+ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER NULL;
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture);
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn);
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index db0e40790dc..d6e21f17aeb 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -76,6 +76,7 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1);
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1);
+UPDATE llx_accounting_system SET fk_country = 1 WHERE fk_country IS NULL;
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'auguria';
UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'bureau2crea';
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index 753f83ba6ad..ace3e518003 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -286,9 +286,12 @@ ReportPurchaseTurnover=Purchase turnover invoiced
ReportPurchaseTurnoverCollected=Purchase turnover collected
IncludeVarpaysInResults = Include various payments in reports
IncludeLoansInResults = Include loans in reports
-InvoiceLate30Days = Invoices late > 30 days
-InvoiceLate15Days = Invoices late > 15 days
-InvoiceLateMinus15Days = Invoices late
-InvoiceNotLate = To be collected < 15 days
-InvoiceNotLate15Days = To be collected in 15 days
-InvoiceNotLate30Days = To be collected in 30 days
+InvoiceLate30Days = Invoices late (> 30 days)
+InvoiceLate15Days = Invoices late (15 to 30 days)
+InvoiceLateMinus15Days = Invoices late (< 15 days)
+InvoiceNotLate = To be collected (< 15 days)
+InvoiceNotLate15Days = To be collected (15 to 30 days)
+InvoiceNotLate30Days = To be collected (> 30 days)
+InvoiceToPay=To pay (< 15 days)
+InvoiceToPay15Days=To pay (15 to 30 days)
+InvoiceToPay30Days=To pay (> 30 days)
\ No newline at end of file
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 5da6be656e5..8c91d842485 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -75,10 +75,10 @@ EventOrganizationMassEmailSpeakers = Communication to speakers
#
# Event
#
-AllowUnknownPeopleSuggestConf=Allow unknown people to suggest conferences
-AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest conferences
-AllowUnknownPeopleSuggestBooth=Allow unknown people to suggest booth
-AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to suggest booth
+AllowUnknownPeopleSuggestConf=Allow people to suggest conferences
+AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest a conference they want to do
+AllowUnknownPeopleSuggestBooth=Allow people to apply for a booth
+AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to apply for a booth
PriceOfRegistration=Price of registration
PriceOfRegistrationHelp=Price to pay to register or participate in the event
PriceOfBooth=Subscription price to stand a booth
@@ -106,9 +106,9 @@ EvntOrgCancelled = Cancelled
#
SuggestForm = Suggestion page
SuggestOrVoteForConfOrBooth = Page for suggestion or vote
-EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or booth or suggest a new one for the event
-EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project
-EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project
+EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or suggest a new one for the event. You can also apply to have a booth during the event.
+EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference to animate during the event.
+EvntOrgRegistrationBoothHelpMessage = Here, you can apply to have a booth during the event.
ListOfSuggestedConferences = List of suggested conferences
ListOfSuggestedBooths = List of suggested booths
ListOfConferencesOrBooths=List of conferences or booths of event project
@@ -136,6 +136,10 @@ OrganizationEventPaymentOfBoothWasReceived=Your payment for your booth has been
OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded
OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
+OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner)
+
+NewSuggestionOfBooth=Application for a booth
+NewSuggestionOfConference=Application for a conference
#
# Vote page
@@ -153,7 +157,7 @@ ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an e
Attendee = Attendee
PaymentConferenceAttendee = Conference attendee payment
PaymentBoothLocation = Booth location payment
-
+DeleteConferenceOrBoothAttendee=Remove attendee
RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email %s
EmailAttendee=Attendee email
EmailCompanyForInvoice=Company email (for invoice, if different of attendee email)
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index fb6e20adcca..6004482cb29 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1157,3 +1157,4 @@ RecordsApproved=%s Record(s) approved
Properties=Properties
hasBeenValidated=%s has been validated
ClientTZ=Client Time Zone (user)
+NotClosedYet=Not yet closed
\ No newline at end of file
diff --git a/htdocs/modulebuilder/template/lib/mymodule.lib.php b/htdocs/modulebuilder/template/lib/mymodule.lib.php
index 2cfc428b7ce..32ae980e946 100644
--- a/htdocs/modulebuilder/template/lib/mymodule.lib.php
+++ b/htdocs/modulebuilder/template/lib/mymodule.lib.php
@@ -60,7 +60,9 @@ function mymoduleAdminPrepareHead()
//$this->tabs = array(
// 'entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'
//); // to remove a tab
- complete_head_from_modules($conf, $langs, null, $head, $h, 'mymodule');
+ complete_head_from_modules($conf, $langs, null, $head, $h, 'mymodule@mymodule');
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'mymodule@mymodule', 'remove');
return $head;
}
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 99946ff54ce..59a3a1e72b0 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -266,7 +266,7 @@ $sql .= $object->getFieldList('t');
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
- $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key.', ' : '');
+ $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
}
}
// Add fields from hooks
diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php
index 10470c17f6d..7c5c91c0511 100644
--- a/htdocs/mrp/mo_list.php
+++ b/htdocs/mrp/mo_list.php
@@ -207,7 +207,7 @@ $sql .= $object->getFieldList('t');
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
- $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key.', ' : '');
+ $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : "");
}
}
// Add fields from hooks
@@ -276,7 +276,7 @@ foreach($object->fields as $key => $val) {
// Add fields from extrafields
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
- $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
+ $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.", " : "");
}
}
// Add where from hooks
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 210960d627e..078082961a5 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -926,8 +926,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
print '