Translate documentation

This commit is contained in:
Alfredo Altamirano 2019-10-19 11:33:06 -05:00
parent 1ede09c21a
commit 9d9961e936

View File

@ -219,9 +219,9 @@ abstract class CommonInvoice extends CommonObject
} }
/** /**
* Renvoie tableau des ids de facture avoir issus de la facture * Returns array of credit note ids from the invoice
* *
* @return array Tableau d'id de factures avoirs * @return array Array of credit note ids
*/ */
public function getListIdAvoirFromInvoice() public function getListIdAvoirFromInvoice()
{ {
@ -251,10 +251,10 @@ abstract class CommonInvoice extends CommonObject
} }
/** /**
* Renvoie l'id de la facture qui la remplace * Returns the id of the invoice that replaces it
* *
* @param string $option filtre sur statut ('', 'validated', ...) * @param string $option status filter ('', 'validated', ...)
* @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon * @return int <0 si KO, 0 if no invoice replaces it, id of invoice otherwise
*/ */
public function getIdReplacingInvoice($option = '') public function getIdReplacingInvoice($option = '')
{ {
@ -264,10 +264,10 @@ abstract class CommonInvoice extends CommonObject
$sql.= ' AND type < 2'; $sql.= ' AND type < 2';
if ($option == 'validated') $sql.= ' AND fk_statut = 1'; if ($option == 'validated') $sql.= ' AND fk_statut = 1';
// PROTECTION BAD DATA // PROTECTION BAD DATA
// Au cas ou base corrompue et qu'il y a une facture de remplacement validee // In case the database is corrupted and there is a valid replectement invoice
// et une autre non, on donne priorite a la validee. // and another no, priority is given to the valid one.
// Ne devrait pas arriver (sauf si acces concurrentiel et que 2 personnes // Should not happen (unless concurrent access and 2 people have created a
// ont cree en meme temps une facture de remplacement pour la meme facture) // replacement invoice for the same invoice at the same time)
$sql.= ' ORDER BY fk_statut DESC'; $sql.= ' ORDER BY fk_statut DESC';
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
@ -276,12 +276,12 @@ abstract class CommonInvoice extends CommonObject
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
if ($obj) if ($obj)
{ {
// Si il y en a // If there is any
return $obj->rowid; return $obj->rowid;
} }
else else
{ {
// Si aucune facture ne remplace // If no invoice replaces it
return 0; return 0;
} }
} }
@ -544,8 +544,8 @@ abstract class CommonInvoice extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoi une date limite de reglement de facture en fonction des * Returns an invoice payment deadline based on the invoice settlement
* conditions de reglements de la facture et date de facturation. * conditions and billing date.
* *
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
* @return integer Date limite de reglement si ok, <0 si ko * @return integer Date limite de reglement si ok, <0 si ko
@ -589,14 +589,14 @@ abstract class CommonInvoice extends CommonObject
/* Definition de la date limite */ /* Definition de la date limite */
// 0 : ajout du nombre de jours // 0 : adding the number of days
if ($cdr_type == 0) if ($cdr_type == 0)
{ {
$datelim = $this->date + ($cdr_nbjour * 3600 * 24); $datelim = $this->date + ($cdr_nbjour * 3600 * 24);
$datelim += ($cdr_decalage * 3600 * 24); $datelim += ($cdr_decalage * 3600 * 24);
} }
// 1 : application de la regle "fin de mois" // 1 : application of the "end of the month" rule
elseif ($cdr_type == 1) elseif ($cdr_type == 1)
{ {
$datelim = $this->date + ($cdr_nbjour * 3600 * 24); $datelim = $this->date + ($cdr_nbjour * 3600 * 24);
@ -612,13 +612,13 @@ abstract class CommonInvoice extends CommonObject
{ {
$mois += 1; $mois += 1;
} }
// On se deplace au debut du mois suivant, et on retire un jour // We move at the beginning of the next month, and we take a day off
$datelim=dol_mktime(12, 0, 0, $mois, 1, $annee); $datelim=dol_mktime(12, 0, 0, $mois, 1, $annee);
$datelim -= (3600 * 24); $datelim -= (3600 * 24);
$datelim += ($cdr_decalage * 3600 * 24); $datelim += ($cdr_decalage * 3600 * 24);
} }
// 2 : application de la règle, le N du mois courant ou suivant // 2 : application of the rule, the N of the current or next month
elseif ($cdr_type == 2 && !empty($cdr_decalage)) elseif ($cdr_type == 2 && !empty($cdr_decalage))
{ {
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -733,7 +733,7 @@ abstract class CommonInvoiceLine extends CommonObjectLine
public $total_ttc; public $total_ttc;
/** /**
* Liste d'options cumulables: * List of cumulative options:
* Bit 0: 0 si TVA normal - 1 si TVA NPR * Bit 0: 0 si TVA normal - 1 si TVA NPR
* Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except)
* @var int * @var int