diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 2b65ad4a84a..e798eecaefa 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -416,10 +416,13 @@ if ($resql) {
print '
'.$invoice->getLibStatut(5, $alreadypayed).' | ';
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/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 86ddda9769a..6241a0cee15 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2366,7 +2366,7 @@ if ($action == 'create') {
print '';
- $objectsrc->printOriginLinesList();
+ $objectsrc->printOriginLinesList('', $selectedLines);
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);