Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/core/class/html.formmail.class.php
This commit is contained in:
Laurent Destailleur 2021-02-03 21:02:32 +01:00
commit f301635681
40 changed files with 79 additions and 62 deletions

View File

@ -312,7 +312,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function
$html .= ' '.$langs->trans("PHPSupport", $name);
}
} else {
if (strtolower($name) == 'xdebug') $html .= yn(0);
if (strtolower($name) == 'xdebug') $html .= yn(0).' - ';
else $html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
if (in_array(strtolower($name), $loaded)) {
$html .= ' '.$langs->trans("Loaded").' - ';

View File

@ -318,7 +318,7 @@ switch ($action)
if ($invoice->total_ttc == $obj_facturation->amountWithTax()
&& $obj_facturation->getSetPaymentMode() != 'DIFF')
{
// We set status to payed
// We set status to paid
$result = $invoice->set_paid($user);
//print 'set paid';exit;
}

View File

@ -514,7 +514,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
{
$s .= '<script type="text/javascript">'."\n";
$s .= 'jQuery(document).ready(function () {
jQuery("table input[name^=\"check_ext\"]").click(function() {
jQuery("div input[name^=\"check_ext\"]").click(function() {
var name = $(this).attr("name");
jQuery(".family_ext" + name.replace("check_ext", "")).toggle();
});
@ -524,7 +524,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
foreach ($showextcals as $val)
{
$htmlname = md5($val['name']);
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_ext'.$htmlname.'" name="check_ext'.$htmlname.'" checked> '.$val['name'].' &nbsp; </div>';
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_ext'.$htmlname.'" name="check_ext'.$htmlname.'" checked> <label for="check_ext'.$htmlname.'">'.$val['name'].'</label> &nbsp; </div>';
}
}

View File

@ -1051,7 +1051,7 @@ class Invoices extends DolibarrApi
}
if ($this->invoice->paye) {
throw new RestException(500, 'Alreay payed');
throw new RestException(500, 'Alreay paid');
}
$this->invoice->fetch($id);

View File

@ -1165,6 +1165,7 @@ class Facture extends CommonInvoice
$object->id = 0;
$object->statut = self::STATUS_DRAFT;
$object->status = self::STATUS_DRAFT;
// Clear fields
$object->date = (empty($this->date) ? dol_now() : $this->date);

View File

@ -1122,7 +1122,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
}
/*
* Unpayed supplier invoices
* Unpaid supplier invoices
*/
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
{

View File

@ -381,7 +381,7 @@ class Localtax extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* localtax payed
* Total of localtax paid in invoice
*
* @param int $year Year
* @return int ???
@ -419,8 +419,7 @@ class Localtax extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* localtax payed
* Total de la localtax payed
* Total of localtax paid
*
* @param int $year Year
* @return int ???

View File

@ -565,7 +565,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/*
* Payed
* Paid
*/
print load_fiche_titre($langs->transcountry($LTPaid, $mysoc->country_code), '', '');

View File

@ -162,7 +162,7 @@ print dol_get_fiche_end();
/*
* List of social contributions payed
* List of social contributions paid
*/
$disable_delete = 0;
@ -213,7 +213,7 @@ if ($resql)
print '<td class="right">'.price($objp->sc_amount).'</td>';
// Status
print '<td class="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>';
// Amount payed
// Amount paid
print '<td class="right">'.price($objp->amount).'</td>';
print "</tr>\n";
if ($objp->paye == 1) // If at least one invoice is paid, disable delete

View File

@ -371,7 +371,7 @@ class BonPrelevement extends CommonObject
$num = count($facs);
for ($i = 0; $i < $num; $i++)
{
/* Tag invoice as payed */
/* Tag invoice as paid */
dol_syslog(get_class($this)."::set_credite set_paid fac ".$facs[$i]);
$fac = new Facture($this->db);
$fac->fetch($facs[$i]);

View File

@ -430,7 +430,7 @@ class ChargeSociales extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Tag social contribution as payed completely
* Tag social contribution as paid completely
*
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
@ -448,7 +448,7 @@ class ChargeSociales extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Remove tag payed on social contribution
* Remove tag paid on social contribution
*
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
@ -468,7 +468,7 @@ class ChargeSociales extends CommonObject
* Retourne le libelle du statut d'une charge (impaye, payee)
*
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise)
* @return string Label
*/
public function getLibStatut($mode = 0, $alreadypaid = -1)
@ -482,7 +482,7 @@ class ChargeSociales extends CommonObject
*
* @param int $status Id status
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise)
* @return string Label
*/
public function LibStatut($status, $mode = 0, $alreadypaid = -1)

View File

@ -115,7 +115,7 @@ class PaymentSocialContribution extends CommonObject
* Use this->amounts to have list of lines for the payment
*
* @param User $user User making payment
* @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more
* @param int $closepaidcontrib 1=Also close paid contributions to paid, 0=Do nothing more
* @return int <0 if KO, id of payment if OK
*/
public function create($user, $closepaidcontrib = 0)
@ -183,7 +183,7 @@ class PaymentSocialContribution extends CommonObject
{
$amount = price2num($amount);
// If we want to closed payed invoices
// If we want to closed paid invoices
if ($closepaidcontrib)
{
$contrib = new ChargeSociales($this->db);

View File

@ -413,7 +413,7 @@ class Tva extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* VAT payed
* Total of VAT paid into invoice
*
* @param int $year Year
* @return double Amount
@ -451,7 +451,7 @@ class Tva extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Total of the VAT payed
* Total of the VAT paid
*
* @param int $year Year
* @return double Amount

View File

@ -543,7 +543,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/*
* Payed
* Paid
*/
print load_fiche_titre($langs->trans("VATPaid"), '', '');

View File

@ -26,7 +26,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
/**
* Class to manage the box to show not payed suppliers invoices
* Class to manage the box to show not paid suppliers invoices
*/
class box_factures_fourn_imp extends ModeleBoxes
{

View File

@ -488,13 +488,18 @@ class FormMail extends Form
// Zone to select email template
if (count($modelmail_array) > 0) {
$model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id;
// If list of template is filled
$out .= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
$out .= '<span class="opacitymedium">'.$langs->trans('SelectMailModel').':</span> ';
$out .= $this->selectarray('modelmailselected', $modelmail_array, 0, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1, '', 0, 1);
$out .= $this->selectarray('modelmailselected', $modelmail_array, $model_mail_selected_id, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1, '', 0, 1);
if ($user->admin) {
$out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1);
}
$out .= ' &nbsp; ';
$out .= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" id="modelselected">';
$out .= ' &nbsp; ';

View File

@ -748,7 +748,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
// Payed
// Paid
$thirdparty = $object->thirdparty;
$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);

View File

@ -184,7 +184,7 @@ if ($resql)
print '<td class="right">'.price($objp->d_amount).'</td>';
// Status
print '<td class="center">'.$don->getLibStatut(4, $objp->amount).'</td>';
// Amount payed
// Amount paid
print '<td class="right">'.price($objp->amount).'</td>';
print "</tr>\n";
if ($objp->paid == 1) {

View File

@ -66,14 +66,14 @@ class ExpenseReport extends CommonObject
public $date_fin;
/**
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied
*
* @var int Status
*/
public $status;
/**
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied
*
* @var int Status
* @deprecated

View File

@ -270,11 +270,12 @@ if ($step == 1 || $action == 'cleanselect')
if ($action == 'builddoc')
{
$max_execution_time_for_export = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_time = @ini_get("max_execution_time");
if ($max_time && $max_time < $max_execution_time_for_export)
if ($max_time && $max_time < $max_execution_time_for_importexport)
{
@ini_set("max_execution_time", $max_execution_time_for_export); // This work only if safe mode is off. also web servers has timeout of 300
dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically.");
@ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300
}
// Build export file

View File

@ -1248,7 +1248,7 @@ class FactureFournisseur extends CommonInvoice
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Tag invoice as a payed invoice
* Tag invoice as a paid invoice
*
* @param User $user Object user
* @param string $close_code Code indicates whether the class has paid in full while payment is incomplete. Not implementd yet.

View File

@ -229,7 +229,7 @@ class PaiementFourn extends Paiement
$invoice = new FactureFournisseur($this->db);
$invoice->fetch($facid);
// If we want to closed payed invoices
// If we want to closed paid invoices
if ($closepaidinvoices)
{
$paiement = $invoice->getSommePaiement();

View File

@ -489,7 +489,7 @@ if (empty($reshook))
$result = $discountcheck->fetch(0, 0, $object->id);
$canconvert = 0;
if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) $canconvert = 1; // we can convert deposit into discount if deposit is payed (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc)
if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) $canconvert = 1; // we can convert deposit into discount if deposit is paid (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc)
if (($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_STANDARD) && $object->paye == 0 && empty($discountcheck->id)) $canconvert = 1; // we can convert credit note into discount if credit note is not refunded completely and not already converted and amount of payment is 0 (see also the real condition used as the condition to show button converttoreduc)
if ($canconvert)
{
@ -2114,7 +2114,7 @@ if ($action == 'create')
{
$langs->loadLangs(array("intracommreport"));
print '<tr><td>'.$langs->trans('IntracommReportTransportMode').'</td><td>';
$form->selectModeTransport(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id');
$form->selectTransportMode(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id');
print '</td></tr>';
}

View File

@ -513,7 +513,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (empty($reshook))
{
/*
* All unpayed supplier invoices
* All unpaid supplier invoices
*/
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ht, f.total_ttc,';
$sql .= ' f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc,';

View File

@ -305,7 +305,7 @@ if ($result > 0)
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'), 'company').' '.$objp->name.'</a></td>';
// Expected to pay
print '<td class="right">'.price($objp->total_ttc).'</td>';
// Payed
// Paid
print '<td class="right">'.price($objp->amount).'</td>';
// Status
print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'</td>';

View File

@ -1518,6 +1518,14 @@ if ($step == 5 && $datatoimport)
}
print '</div>';
} else {
$max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined
$max_time = @ini_get("max_execution_time");
if ($max_time && $max_time < $max_execution_time_for_importexport)
{
dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically.");
@ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300
}
// Launch import
$arrayoferrors = array();
$arrayofwarnings = array();

View File

@ -101,7 +101,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expensereport',204);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',211);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',212);

View File

@ -122,6 +122,7 @@ CREATE TABLE llx_c_transport_mode (
label varchar(255) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_c_transport_mode ADD UNIQUE INDEX uk_c_transport_mode (code, entity);
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1);
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1);
@ -567,3 +568,6 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64);
ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL;
UPDATE llx_c_action_trigger SET code = 'EXPENSE_REPORT_PAID' where code = 'EXPENSE_REPORT_PAYED';

View File

@ -248,7 +248,7 @@ CREATE TABLE llx_expensereport (
fk_user_approve integer DEFAULT NULL,
fk_user_refuse integer DEFAULT NULL,
fk_user_cancel integer DEFAULT NULL,
fk_statut integer NOT NULL, -- 1=brouillon, 2=validé (attente approb), 4=annulé, 5=approuvé, 6=payed, 99=refusé
fk_statut integer NOT NULL, -- 1=draft, 2=validate (waiting approbation), 4=cancel, 5=approved, 6=paid, 99=refused
fk_c_paiement integer DEFAULT NULL,
paid smallint DEFAULT 0 NOT NULL,
note_public text,
@ -524,13 +524,13 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice paid','Executed when a customer invoice is paid','facture',7);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice paid','Executed when a supplier invoice is paid','invoice_supplier',16);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20);

View File

@ -509,7 +509,7 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL
-- from llx_facturedet as fd, llx_facture as f where fd.fk_facture = f.rowid AND (total_ht - situation_percent / 100 * subprice * qty * (1 - (fd.remise_percent / 100))) > 0.01 and f.type = 5;
-- Note to make all deposit as payed when there is already a discount generated from it.
-- Note to make all deposit as paid when there is already a discount generated from it.
--drop table tmp_invoice_deposit_mark_as_available;
--create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except);
--update llx_facture set paye = 1, fk_statut = 2 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available);

View File

@ -43,7 +43,7 @@ CREATE TABLE llx_expensereport (
fk_user_approve integer DEFAULT NULL,
fk_user_refuse integer DEFAULT NULL,
fk_user_cancel integer DEFAULT NULL,
fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=payed, 99=refused
fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=paid, 99=refused
fk_c_paiement integer DEFAULT NULL, -- deprecated
paid smallint default 0 NOT NULL, -- deprecated (status is used instead)
note_public text,

View File

@ -377,7 +377,7 @@ class Loan extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Tag loan as payed completely
* Tag loan as paid completely
*
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
@ -445,7 +445,7 @@ class Loan extends CommonObject
* Return label of loan status (unpaid, paid)
*
* @param int $mode 0=label, 1=short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise)
* @return string Label
*/
public function getLibStatut($mode = 0, $alreadypaid = -1)
@ -459,7 +459,7 @@ class Loan extends CommonObject
*
* @param int $status Id status
* @param int $mode 0=Label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label, 5=Short label + Picto
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise)
* @return string Label
*/
public function LibStatut($status, $mode = 0, $alreadypaid = -1)

View File

@ -93,7 +93,7 @@ $help_url = '';
$title = $langs->trans('Loans');
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,";
$sql .= " SUM(pl.amount_capital) as alreadypayed";
$sql .= " SUM(pl.amount_capital) as alreadypaid";
$sql .= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl";
$sql .= " ON l.rowid = pl.fk_loan";
$sql .= " WHERE l.entity = ".$conf->entity;
@ -229,7 +229,7 @@ if ($resql)
print '<td class="center width100">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
print '<td class="right nowrap">';
print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed);
print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypaid);
print '</td>';
print '<td></td>';

View File

@ -149,7 +149,7 @@ print '</div>';
/*
* List of loans payed
* List of loans paid
*/
$disable_delete = 0;
@ -194,7 +194,7 @@ if ($resql)
// print '<td class="right">'.price($objp->capital).'</td>';
// Status
print '<td class="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>';
// Amount payed
// Amount paid
$amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest;
print '<td class="right">'.price($amount_payed).'</td>';

View File

@ -534,7 +534,6 @@ if ($id > 0 || !empty($ref))
print "</table>";
print "</form>";
} else {
print "ErrorRecordNotFound";
}

View File

@ -1855,7 +1855,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
{
$noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref.
$paymentintent = $stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object) ? ' ref='.$object->ref : ''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key);
// The paymentintnent has status 'requires_payment_method' (even if paymentintent was already payed)
// The paymentintnent has status 'requires_payment_method' (even if paymentintent was already paid)
//var_dump($paymentintent);
if ($stripe->error) setEventMessages($stripe->error, null, 'errors');
}

View File

@ -614,7 +614,7 @@ if ($ispaymentok)
$ispostactionok = -1;
}
} else {
$postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription payed was not found';
$postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription paid was not found';
$ispostactionok = -1;
}
} elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0)
@ -718,7 +718,7 @@ if ($ispaymentok)
$ispostactionok = -1;
}
} else {
$postactionmessages[] = 'Invoice payed '.$tmptag['INV'].' was not found';
$postactionmessages[] = 'Invoice paid '.$tmptag['INV'].' was not found';
$ispostactionok = -1;
}
} else {

View File

@ -1068,7 +1068,7 @@ class Thirdparties extends DolibarrApi
/**
* Return list of invoices qualified to be corrected by a credit note.
* Invoices matching the following rules are returned
* (validated + payment on process) or classified (payed completely or payed partialy) + not already replaced + not already a credit note
* (validated + payment on process) or classified (paid completely or paid partialy) + not already replaced + not already a credit note
*
* @param int $id Id of thirdparty
*

View File

@ -777,10 +777,9 @@ $( document ).ready(function() {
print "ModalBox('ModalTerminal');";
}
if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING)
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE ";
$sql .= "date(date_creation) = CURDATE() ";
$sql .= "";
$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE";
$sql .= " entity = ".$conf->entity." AND ";
$sql .= " date(date_creation) = CURDATE()";
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
@ -1026,8 +1025,9 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
);
}
$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE ";
$sql .= "date(date_creation) = CURDATE() ";
$sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE";
$sql .= " entity = ".$conf->entity." AND ";
$sql .= " date(date_creation) = CURDATE()";
$resql = $db->query($sql);
if ($resql)
{

View File

@ -242,7 +242,7 @@ class FactureTest extends PHPUnit\Framework\TestCase
true,
array(
'newref','oldref','id','lines','client','thirdparty','brouillon','user_author','date_creation','date_validation','datem','date_modification',
'ref','statut','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement',
'ref','statut','status','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement',
'cond_reglement_doc', 'modelpdf',
'multicurrency_total_ht','multicurrency_total_tva', 'multicurrency_total_ttc','fk_multicurrency','multicurrency_code','multicurrency_tx',
'retained_warranty' ,'retained_warranty_date_limit', 'retained_warranty_fk_cond_reglement', 'specimen', 'situation_cycle_ref', 'situation_counter', 'situation_final',