Qual: Spelling compta code (#27413)
# Qual: Fix spelling of files in htdocs/compta No code should be changed, only comments modified or translated.
This commit is contained in:
parent
6b42b48d20
commit
52ee926bac
64 changed files with 212 additions and 212 deletions
|
|
@ -727,7 +727,7 @@ if (!empty($date_start) && !empty($date_stop)) {
|
|||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "item", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ if ($currentInvId) { // Here to breakdown
|
|||
$result += $currentRemain;
|
||||
}
|
||||
} else {
|
||||
// Reset the substraction for this amount
|
||||
// Reset the subtraction for this amount
|
||||
$result += price2num($currentAmount);
|
||||
$currentAmount = 0;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ if ($currentInvId) { // Here to breakdown
|
|||
$currentRemain : // Remain can be fully paid
|
||||
$currentRemain + ($result - $currentRemain)); // Remain can only partially be paid
|
||||
$currentAmount = $amountToBreakdown; // In both cases, amount will take breakdown value
|
||||
$result -= $amountToBreakdown; // And canceled substraction has been replaced by breakdown
|
||||
$result -= $amountToBreakdown; // And canceled subtraction has been replaced by breakdown
|
||||
} // else there's no need to calc anything, just reset the field (result is still < 0)
|
||||
}
|
||||
$toJsonArray['amount_'.$currentInvId] = price2num($currentAmount); // Param will exist only if an img has been clicked
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ if (!$year_start) {
|
|||
|
||||
$form = new Form($db);
|
||||
|
||||
// Get account informations
|
||||
// Get account information
|
||||
$object = new Account($db);
|
||||
if ($id > 0 && !preg_match('/,/', $id)) { // if for a particular account and not a list
|
||||
$result = $object->fetch($id);
|
||||
|
|
@ -177,7 +177,7 @@ print dol_get_fiche_end();
|
|||
// Affiche tableau
|
||||
print load_fiche_titre('', $link, '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
||||
|
|
@ -334,7 +334,7 @@ if ($result < 0) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
// Chargement de labels et data_xxx pour tableau 4 Mouvements
|
||||
// Chargement de labels et data_xxx pour tableau 4 Movements
|
||||
$labels = array();
|
||||
$data_year_0 = array();
|
||||
$data_year_1 = array();
|
||||
|
|
@ -416,7 +416,7 @@ if ($result < 0) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
// Chargement de labels et data_xxx pour tableau 4 Mouvements
|
||||
// Chargement de labels et data_xxx pour tableau 4 Movements
|
||||
$labels = array();
|
||||
$data_year_0 = array();
|
||||
$data_year_1 = array();
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', '
|
|||
&& (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) {
|
||||
$error = 0;
|
||||
|
||||
// Definition, nettoyage parametres
|
||||
// Definition, nettoyage parameters
|
||||
$num_releve = GETPOST("num_releve", "alpha");
|
||||
|
||||
if ($num_releve) {
|
||||
|
|
@ -722,7 +722,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
|||
}
|
||||
|
||||
if (($id > 0 || !empty($ref)) && ((string) $page == '')) {
|
||||
// We open a list of transaction of a dedicated account and no page was set by defaut
|
||||
// We open a list of transaction of a dedicated account and no page was set by default
|
||||
// We force on last page.
|
||||
$page = ($nbtotalofpages - 1);
|
||||
$offset = $limit * $page;
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ if ($action == 'create') {
|
|||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// TODO Add a link "Show more..." for all ohter informations.
|
||||
// TODO Add a link "Show more..." for all other information.
|
||||
|
||||
// Show fields of bank account
|
||||
foreach ($object->getFieldsToShow() as $val) {
|
||||
|
|
@ -890,7 +890,7 @@ if ($action == 'create') {
|
|||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
|
||||
$canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements
|
||||
$canbedeleted = $object->can_be_deleted(); // Return true if account without movements
|
||||
if ($user->hasRight('banque', 'configurer') && $canbedeleted) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
|||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
*/
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("Label").'</td>';
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ class Account extends CommonObject
|
|||
public $balance;
|
||||
|
||||
/**
|
||||
* Creditor Identifier CI. Some banks use different ICS for direct debit and bank tranfer
|
||||
* Creditor Identifier CI. Some banks use different ICS for direct debit and bank transfer
|
||||
* @var string
|
||||
*/
|
||||
public $ics;
|
||||
|
|
@ -289,7 +289,7 @@ class Account extends CommonObject
|
|||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
|
|
@ -466,7 +466,7 @@ class Account extends CommonObject
|
|||
$sql .= ") VALUES (";
|
||||
$sql .= " ".((int) $line_id);
|
||||
$sql .= ", ".((int) $url_id);
|
||||
$sql .= ", '".$this->db->escape($url)."'"; // dperecated
|
||||
$sql .= ", '".$this->db->escape($url)."'"; // deprecated
|
||||
$sql .= ", '".$this->db->escape($label)."'";
|
||||
$sql .= ", '".$this->db->escape($type)."'";
|
||||
$sql .= ")";
|
||||
|
|
@ -543,10 +543,10 @@ class Account extends CommonObject
|
|||
*
|
||||
* @param int $date Date operation
|
||||
* @param string $oper 'VIR','PRE','LIQ','VAD','CB','CHQ'...
|
||||
* @param string $label Descripton
|
||||
* @param string $label Description
|
||||
* @param float $amount Amount
|
||||
* @param string $num_chq Numero cheque or transfer
|
||||
* @param int $categorie Category id (optionnal)
|
||||
* @param int $categorie Category id (optional)
|
||||
* @param User $user User that create
|
||||
* @param string $emetteur Name of cheque writer
|
||||
* @param string $banque Bank of cheque writer
|
||||
|
|
@ -700,7 +700,7 @@ class Account extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
// Load librairies to check BAN
|
||||
// Load libraries to check BAN
|
||||
$balance = $this->balance;
|
||||
if (empty($balance) && !empty($this->solde)) {
|
||||
$balance = $this->solde;
|
||||
|
|
@ -1218,9 +1218,9 @@ class Account extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoi si un compte peut etre supprimer ou non (sans mouvements)
|
||||
* Indicates if an account can be deleted or not (without movements)
|
||||
*
|
||||
* @return boolean vrai si peut etre supprime, faux sinon
|
||||
* @return boolean True is the deletion is ok, false if not
|
||||
*/
|
||||
public function can_be_deleted()
|
||||
{
|
||||
|
|
@ -1292,7 +1292,7 @@ class Account extends CommonObject
|
|||
/**
|
||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||
*
|
||||
* @param User $user Objet user
|
||||
* @param User $user Object user
|
||||
* @param int $filteraccountid To get info for a particular account id
|
||||
* @return WorkboardResponse|int Return integer <0 if KO, WorkboardResponse if OK
|
||||
*/
|
||||
|
|
@ -1348,7 +1348,7 @@ class Account extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Charge indicateurs this->nb de tableau de bord
|
||||
* Load the indicators this->nb for the state board
|
||||
*
|
||||
* @param int $filteraccountid To get info for a particular account id
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
@ -2339,7 +2339,7 @@ class AccountLine extends CommonObjectLine
|
|||
/**
|
||||
* Update conciliation field
|
||||
*
|
||||
* @param User $user Objet user making update
|
||||
* @param User $user Object user making update
|
||||
* @param int $cat Category id
|
||||
* @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class BankAccounts extends DolibarrApi
|
|||
* @param int $page Page number
|
||||
* @param int $category Use this param to filter list by category
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.import_key:<:'20160101')"
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
|
||||
* @return array List of account objects
|
||||
*
|
||||
* @throws RestException
|
||||
|
|
@ -159,7 +159,7 @@ class BankAccounts extends DolibarrApi
|
|||
$account = new Account($this->db);
|
||||
foreach ($request_data as $field => $value) {
|
||||
if ($field === 'caller') {
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller
|
||||
$account->context['caller'] = $request_data['caller'];
|
||||
continue;
|
||||
}
|
||||
|
|
@ -245,7 +245,7 @@ class BankAccounts extends DolibarrApi
|
|||
$result = 0;
|
||||
$user = DolibarrApiAccess::$user;
|
||||
|
||||
// By default, electronic transfert from bank to bank
|
||||
// By default, electronic transfer from bank to bank
|
||||
$typefrom = 'PRE';
|
||||
$typeto = 'VIR';
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ class BankAccounts extends DolibarrApi
|
|||
continue;
|
||||
}
|
||||
if ($field === 'caller') {
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller
|
||||
$account->context['caller'] = $request_data['caller'];
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class PaymentVarious extends CommonObject
|
|||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ if ($result < 0) {
|
|||
}
|
||||
|
||||
|
||||
// Chargement de labels et data_xxx pour tableau 4 Mouvements
|
||||
// Chargement de labels et data_xxx pour tableau 4 Movements
|
||||
$labels = array();
|
||||
$data_credit = array();
|
||||
$data_debit = array();
|
||||
|
|
@ -701,7 +701,7 @@ if ($result < 0) {
|
|||
}
|
||||
|
||||
|
||||
// Chargement de labels et data_xxx pour tableau 4 Mouvements
|
||||
// Chargement de labels et data_xxx pour tableau 4 Movements
|
||||
$labels = array();
|
||||
$data_credit = array();
|
||||
$data_debit = array();
|
||||
|
|
|
|||
|
|
@ -261,12 +261,12 @@ if ($user->hasRight('banque', 'consolidate') && ($action == 'num_releve' || $act
|
|||
$updatePathFile = true;
|
||||
$update_dir = true;
|
||||
|
||||
dol_syslog("line.php update bank line to set the new bank receipt nuber", LOG_DEBUG);
|
||||
dol_syslog("line.php update bank line to set the new bank receipt number", LOG_DEBUG);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
// We must not rename the directory of the bank receipt when we change 1 line of bank receipt. Other lines may share the same old ref.
|
||||
// Renaming can be done when we rename globaly a bank receipt but not when changing 1 line from one receipt into another one.
|
||||
// Renaming can be done when we rename globally a bank receipt but not when changing 1 line from one receipt into another one.
|
||||
/*
|
||||
if ($result) {
|
||||
if ($oldNum_rel) {
|
||||
|
|
@ -469,7 +469,7 @@ if ($result) {
|
|||
print img_object($langs->trans('Donation'), 'payment').' ';
|
||||
print $langs->trans("DonationPayment");
|
||||
print '</a>';
|
||||
} elseif ($links[$key]['type'] == 'banktransfert') { // transfert between 1 local account and another local account
|
||||
} elseif ($links[$key]['type'] == 'banktransfert') { // transfer between 1 local account and another local account
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$links[$key]['url_id'].'">';
|
||||
print img_object($langs->trans('Transaction'), 'payment').' ';
|
||||
print $langs->trans("TransactionOnTheOtherAccount");
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ if (empty($numref)) {
|
|||
print '<td valign="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$objp->rowid.'&account='.$object->id.'">';
|
||||
$reg = array();
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parentheses on tente recherche de traduction
|
||||
if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) {
|
||||
print $langs->trans($reg[1]);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ if ($action == 'add' && $user->hasRight('banque', 'transfer')) {
|
|||
$bank_line_id_to = 0;
|
||||
$result = 0;
|
||||
|
||||
// By default, electronic transfert from bank to bank
|
||||
// By default, electronic transfer from bank to bank
|
||||
$typefrom = $type[$n];
|
||||
$typeto = $type[$n];
|
||||
if ($tmpaccountto->courant == Account::TYPE_CASH || $tmpaccountfrom->courant == Account::TYPE_CASH) {
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('sele
|
|||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if (!$sortorder) {
|
|||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
// Initialize array of search criterias
|
||||
// Initialize array of search criteria
|
||||
$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
|
||||
$search = array();
|
||||
foreach ($object->fields as $key => $val) {
|
||||
|
|
@ -445,7 +445,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class CashControl extends CommonObject
|
|||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200'
|
||||
|
|
@ -258,7 +258,7 @@ class CashControl extends CommonObject
|
|||
|
||||
// Protection
|
||||
if ($this->status == self::STATUS_VALIDATED) {
|
||||
dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING);
|
||||
dol_syslog(get_class($this)."::valid action abandoned: already validated", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ while ($j < $numlt) {
|
|||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
|
|||
$error = 0;
|
||||
|
||||
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
|
||||
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
|
||||
$object->type = GETPOST('type', 'alpha');
|
||||
$object->socid = (int) GETPOST('socid', 'int');
|
||||
$object->fk_user = (int) GETPOST('fk_user', 'int');
|
||||
|
|
@ -141,7 +141,7 @@ if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
|
|||
$result = $object->fetch($id);
|
||||
|
||||
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
|
||||
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
|
||||
$object->type = GETPOST('type', 'alpha');
|
||||
$object->socid = (int) GETPOST('socid', 'int');
|
||||
$object->fk_user = (int) GETPOST('fk_user', 'int');
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
/**
|
||||
* \file htdocs/compta/deplacement/class/deplacementstats.class.php
|
||||
* \ingroup factures
|
||||
* \brief Fichier de la classe de gestion des stats des deplacement et notes de frais
|
||||
* \brief File for class managaging the statistics of travel and expense notes
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion des stats des deplacements et notes de frais
|
||||
* Class to manage the statistics of travel and expense notes
|
||||
*/
|
||||
class DeplacementStats extends Stats
|
||||
{
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ if (empty($reshook)) {
|
|||
$pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU');
|
||||
} elseif ($tmpvat != $tmpprodvat) {
|
||||
// On reevalue prix selon taux tva car taux tva transaction peut etre different
|
||||
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
|
||||
// de ceux du produit par default (par example si pays different entre vendeur et acheteur).
|
||||
if ($price_base_type != 'HT') {
|
||||
$pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU');
|
||||
} else {
|
||||
|
|
@ -761,7 +761,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Add buying price
|
||||
$fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : '');
|
||||
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
|
||||
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value
|
||||
|
||||
// Extrafields
|
||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||
|
|
@ -1527,7 +1527,7 @@ if ($action == 'create') {
|
|||
|
||||
print '<tr><td colspan="2">'.img_picto('', 'recurring', 'class="pictofixedwidth"').$title.'</td></tr>';
|
||||
|
||||
// if "frequency" is empty or = 0, the reccurence is disabled
|
||||
// if "frequency" is empty or = 0, the recurrence is disabled
|
||||
print '<tr><td style="width: 50%">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Frequency');
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ if (empty($reshook)) {
|
|||
$array_of_total_ht_per_vat_rate = array();
|
||||
$array_of_total_ht_devise_per_vat_rate = array();
|
||||
foreach ($object->lines as $line) {
|
||||
//$vat_src_code_for_line = $line->vat_src_code; // TODO We chek sign of total per vat without taking into account the vat code because for the moment the vat code is lost/unknown when we add a down payment.
|
||||
//$vat_src_code_for_line = $line->vat_src_code; // TODO We check sign of total per vat without taking into account the vat code because for the moment the vat code is lost/unknown when we add a down payment.
|
||||
$vat_src_code_for_line = '';
|
||||
if (empty($array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$vat_src_code_for_line])) {
|
||||
$array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$vat_src_code_for_line] = 0;
|
||||
|
|
@ -796,7 +796,7 @@ if (empty($reshook)) {
|
|||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) {
|
||||
// Classif "paid partialy"
|
||||
// Classif "paid partially"
|
||||
$object->fetch($id);
|
||||
$close_code = GETPOST("close_code", 'restricthtml');
|
||||
$close_note = GETPOST("close_note", 'restricthtml');
|
||||
|
|
@ -833,10 +833,10 @@ if (empty($reshook)) {
|
|||
|
||||
$canconvert = 0;
|
||||
if ($object->type == Facture::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)
|
||||
$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 == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_SITUATION) && $object->paye == 0 && empty($discountcheck->id)) {
|
||||
$canconvert = 1; // we can convert credit note into discount if credit note is not payed back and not already converted and amount of payment is 0 (see real condition into condition used to show button converttoreduc)
|
||||
$canconvert = 1; // we can convert credit note into discount if credit note is not paid back and not already converted and amount of payment is 0 (see real condition into condition used to show button converttoreduc)
|
||||
}
|
||||
|
||||
if ($canconvert) {
|
||||
|
|
@ -967,7 +967,7 @@ if (empty($reshook)) {
|
|||
|
||||
if (empty($error)) {
|
||||
if ($object->type != Facture::TYPE_DEPOSIT) {
|
||||
// Classe facture
|
||||
// Set invoice as paid
|
||||
$result = $object->setPaid($user);
|
||||
if ($result >= 0) {
|
||||
$db->commit();
|
||||
|
|
@ -1254,7 +1254,7 @@ if (empty($reshook)) {
|
|||
$line->fk_parent_line = $fk_parent_line;
|
||||
|
||||
$line->subprice = -$line->subprice; // invert price for object
|
||||
$line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here
|
||||
$line->pa_ht = $line->pa_ht; // we chose to have buy/cost price always positive, so no revert of sign here
|
||||
$line->total_ht = -$line->total_ht;
|
||||
$line->total_tva = -$line->total_tva;
|
||||
$line->total_ttc = -$line->total_ttc;
|
||||
|
|
@ -1267,7 +1267,7 @@ if (empty($reshook)) {
|
|||
$line->multicurrency_total_ttc = -$line->multicurrency_total_ttc;
|
||||
|
||||
$line->context['createcreditnotefrominvoice'] = 1;
|
||||
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
|
||||
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount already linked
|
||||
|
||||
$object->lines[] = $line; // insert new line in current object
|
||||
|
||||
|
|
@ -2253,7 +2253,7 @@ if (empty($reshook)) {
|
|||
$desc = $prod->description;
|
||||
}
|
||||
|
||||
//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
|
||||
//If text set in desc is the same as product descpription (as now it's preloaded) we add it only one time
|
||||
if ($product_desc==$desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
|
||||
$product_desc='';
|
||||
}
|
||||
|
|
@ -2512,7 +2512,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Add buying price
|
||||
$fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : '');
|
||||
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
|
||||
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value
|
||||
|
||||
// Prepare a price equivalent for minimum price check
|
||||
$pu_equivalent = $pu_ht;
|
||||
|
|
@ -2820,7 +2820,7 @@ if (empty($reshook)) {
|
|||
$errors++;
|
||||
}
|
||||
|
||||
// Change each progression persent on each lines
|
||||
// Change each progression percent on each lines
|
||||
foreach ($object->lines as $line) {
|
||||
// no traitement for special product
|
||||
if ($line->product_type == 9) {
|
||||
|
|
@ -3142,7 +3142,7 @@ if ($action == 'create') {
|
|||
$projectid = (!empty($projectid) ? $projectid : $objectsrc->fk_project);
|
||||
$ref_client = (!empty($objectsrc->ref_client) ? $objectsrc->ref_client : (!empty($objectsrc->ref_customer) ? $objectsrc->ref_customer : ''));
|
||||
|
||||
// only if socid not filled else it's allready done upper
|
||||
// only if socid not filled else it's already done above
|
||||
if (empty($socid)) {
|
||||
$soc = $objectsrc->thirdparty;
|
||||
}
|
||||
|
|
@ -3324,7 +3324,7 @@ if ($action == 'create') {
|
|||
print '<td colspan="2">';
|
||||
$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company($soc->id, 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
|
||||
// Option to reload page to retrieve customer informations.
|
||||
// Option to reload page to retrieve customer information.
|
||||
if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
|
||||
print '<script>
|
||||
$(document).ready(function() {
|
||||
|
|
@ -3402,7 +3402,7 @@ if ($action == 'create') {
|
|||
|
||||
print ajax_combobox("fac_rec");
|
||||
|
||||
// Option to reload page to retrieve customer informations. Note, this clear other input
|
||||
// Option to reload page to retrieve customer information. Note, this clear other input
|
||||
if (!getDolGlobalString('RELOAD_PAGE_ON_TEMPLATE_CHANGE_DISABLED')) {
|
||||
print '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
|
@ -3741,8 +3741,8 @@ if ($action == 'create') {
|
|||
$jsListType = '';
|
||||
foreach ($listtType as $type) {
|
||||
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$type;
|
||||
$curent = getDolGlobalString($thisTypeConfName, getDolGlobalString('FACTURE_ADDON_PDF'));
|
||||
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"';
|
||||
$current = getDolGlobalString($thisTypeConfName, getDolGlobalString('FACTURE_ADDON_PDF'));
|
||||
$jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$current.'"';
|
||||
}
|
||||
|
||||
print '<script type="text/javascript">
|
||||
|
|
@ -4151,8 +4151,8 @@ if ($action == 'create') {
|
|||
$resteapayeraffiche = $resteapayer;
|
||||
|
||||
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { // Never use this
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
} else {
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
|
||||
|
|
@ -5444,7 +5444,7 @@ if ($action == 'create') {
|
|||
print price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).'</td><td> </td></tr>';
|
||||
}
|
||||
|
||||
// Retained warranty : usualy use on construction industry
|
||||
// Retained warranty : usually use on construction industry
|
||||
if (!empty($object->situation_final) && !empty($object->retained_warranty) && $displayWarranty) {
|
||||
// Billed - retained warranty
|
||||
if ($object->type == Facture::TYPE_SITUATION) {
|
||||
|
|
@ -5641,9 +5641,9 @@ if ($action == 'create') {
|
|||
'class' => 'classfortooltip'
|
||||
)
|
||||
);
|
||||
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
|
||||
// Edit a validated invoice without any payment and not transferred to accounting
|
||||
if ($object->status == Facture::STATUS_VALIDATED) {
|
||||
// We check if lines of invoice are not already transfered into accountancy
|
||||
// We check if lines of invoice are not already transferred into accountancy
|
||||
$ventilExportCompta = $object->getVentilExportCompta();
|
||||
|
||||
if ($ventilExportCompta == 0) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of a invoice object
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param int $id ID of invoice
|
||||
* @param int $contact_list 0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses
|
||||
|
|
@ -79,7 +79,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of an invoice object by ref
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param string $ref Ref of object
|
||||
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses
|
||||
|
|
@ -97,7 +97,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of an invoice object by ref_ext
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param string $ref_ext External reference of object
|
||||
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id, -1: Do not return contacts/adddesses
|
||||
|
|
@ -115,7 +115,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of an invoice object
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param int $id ID of order
|
||||
* @param string $ref Ref of object
|
||||
|
|
@ -171,7 +171,7 @@ class Invoices extends DolibarrApi
|
|||
* @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i}
|
||||
* @param string $status Filter by invoice status : draft | unpaid | paid | cancelled
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||
* @param string $properties Restrict the data returned to theses properties. Ignored if empty. Comma separated list of properties names
|
||||
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
|
||||
* @return array Array of invoice objects
|
||||
*
|
||||
* @throws RestException 404 Not found
|
||||
|
|
@ -290,7 +290,7 @@ class Invoices extends DolibarrApi
|
|||
|
||||
foreach ($request_data as $field => $value) {
|
||||
if ($field === 'caller') {
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller
|
||||
$this->invoice->context['caller'] = $request_data['caller'];
|
||||
continue;
|
||||
}
|
||||
|
|
@ -617,7 +617,7 @@ class Invoices extends DolibarrApi
|
|||
continue;
|
||||
}
|
||||
if ($field === 'caller') {
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again whith the caller
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller
|
||||
$this->invoice->context['caller'] = $request_data['caller'];
|
||||
continue;
|
||||
}
|
||||
|
|
@ -677,7 +677,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Add a line to a given invoice
|
||||
*
|
||||
* Exemple of POST query :
|
||||
* Example of POST query :
|
||||
* {
|
||||
* "desc": "Desc", "subprice": "1.00000000", "qty": "1", "tva_tx": "20.000", "localtax1_tx": "0.000", "localtax2_tx": "0.000",
|
||||
* "fk_product": "1", "remise_percent": "0", "date_start": "", "date_end": "", "fk_code_ventilation": 0, "info_bits": "0",
|
||||
|
|
@ -770,7 +770,7 @@ class Invoices extends DolibarrApi
|
|||
* Adds a contact to an invoice
|
||||
*
|
||||
* @param int $id Order ID
|
||||
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if souce = 'internal') to link
|
||||
* @param int $fk_socpeople Id of thirdparty contact (if source = 'external') or id of user (if source = 'internal') to link
|
||||
* @param string $type_contact Type of contact (code). Must a code found into table llx_c_type_contact. For example: BILLING
|
||||
* @param string $source external=Contact extern (llx_socpeople), internal=Contact intern (llx_user)
|
||||
* @param int $notrigger Disable all triggers
|
||||
|
|
@ -1098,10 +1098,10 @@ class Invoices extends DolibarrApi
|
|||
|
||||
$canconvert = 0;
|
||||
if ($this->invoice->type == Facture::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)
|
||||
$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 (($this->invoice->type == Facture::TYPE_CREDIT_NOTE || $this->invoice->type == Facture::TYPE_STANDARD) && $this->invoice->paye == 0 && empty($discountcheck->id)) {
|
||||
$canconvert = 1; // we can convert credit note into discount if credit note is not payed back and not already converted and amount of payment is 0 (see real condition into condition used to show button converttoreduc)
|
||||
$canconvert = 1; // we can convert credit note into discount if credit note is not paid back and not already converted and amount of payment is 0 (see real condition into condition used to show button converttoreduc)
|
||||
}
|
||||
if ($canconvert) {
|
||||
$this->db->begin();
|
||||
|
|
@ -1203,7 +1203,7 @@ class Invoices extends DolibarrApi
|
|||
|
||||
if (empty($error)) {
|
||||
if ($this->invoice->type != Facture::TYPE_DEPOSIT) {
|
||||
// Classe facture
|
||||
// Set the invoice as paid
|
||||
$result = $this->invoice->setPaid(DolibarrApiAccess::$user);
|
||||
if ($result >= 0) {
|
||||
$this->db->commit();
|
||||
|
|
@ -1710,7 +1710,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of a template invoice object
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param int $id ID of template invoice
|
||||
* @param int $contact_list 0:Return array contains all properties, 1:Return array contains just id, -1: Do not return contacts/adddesses
|
||||
|
|
@ -1728,7 +1728,7 @@ class Invoices extends DolibarrApi
|
|||
/**
|
||||
* Get properties of an invoice object
|
||||
*
|
||||
* Return an array with invoice informations
|
||||
* Return an array with invoice information
|
||||
*
|
||||
* @param int $id ID of order
|
||||
* @param string $ref Ref of object
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class FactureRec extends CommonInvoice
|
|||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
|
|
@ -637,7 +637,7 @@ class FactureRec extends CommonInvoice
|
|||
}
|
||||
}
|
||||
|
||||
// Retreive lines
|
||||
// Retrieve lines
|
||||
if (empty($nolines)) {
|
||||
$result = $this->fetch_lines();
|
||||
if ($result < 0) {
|
||||
|
|
@ -1272,7 +1272,7 @@ class FactureRec extends CommonInvoice
|
|||
* Create all recurrents invoices (for all entities if multicompany is used).
|
||||
* A result may also be provided into this->output.
|
||||
*
|
||||
* WARNING: This method change temporarly context $conf->entity to be in correct context for each recurring invoice found.
|
||||
* WARNING: This method change temporarily context $conf->entity to be in correct context for each recurring invoice found.
|
||||
*
|
||||
* @param int $restrictioninvoiceid 0=All qualified template invoices found. > 0 = restrict action on invoice ID
|
||||
* @param int $forcevalidation 1=Force validation of invoice whatever is template auto_validate flag.
|
||||
|
|
@ -1879,12 +1879,12 @@ class FactureRec extends CommonInvoice
|
|||
global $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setFrequencyAndUnit was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setFrequencyAndUnit was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!empty($frequency) && empty($unit)) {
|
||||
dol_syslog(get_class($this)."::setFrequencyAndUnit was called on objet with params frequency defined but unit not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setFrequencyAndUnit was called on object with params frequency defined but unit not defined", LOG_ERR);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
@ -1931,7 +1931,7 @@ class FactureRec extends CommonInvoice
|
|||
global $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setNextDate was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setNextDate was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
|
|
@ -1975,7 +1975,7 @@ class FactureRec extends CommonInvoice
|
|||
global $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setMaxPeriod was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setMaxPeriod was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -2019,7 +2019,7 @@ class FactureRec extends CommonInvoice
|
|||
global $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setAutoValidate was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setAutoValidate was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -2059,7 +2059,7 @@ class FactureRec extends CommonInvoice
|
|||
global $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setGeneratePdf was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setGeneratePdf was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -2098,7 +2098,7 @@ class FactureRec extends CommonInvoice
|
|||
{
|
||||
global $user;
|
||||
if (!$this->table_element) {
|
||||
dol_syslog(get_class($this)."::setModelPdf was called on objet with property table_element not defined", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::setModelPdf was called on object with property table_element not defined", LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ class Facture extends CommonInvoice
|
|||
public $retained_warranty_fk_cond_reglement;
|
||||
|
||||
/**
|
||||
* @var int availabilty ID
|
||||
* @var int availability ID
|
||||
*/
|
||||
public $availability_id;
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ class Facture extends CommonInvoice
|
|||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
|
|
@ -420,12 +420,12 @@ class Facture extends CommonInvoice
|
|||
*/
|
||||
const STATUS_ABANDONED = 3;
|
||||
|
||||
const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte
|
||||
const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned remain - bad customer
|
||||
const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandonned remain - bank charge
|
||||
const CLOSECODE_OTHER = 'other'; // Abandonned remain - other
|
||||
const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandoned remain - escompte
|
||||
const CLOSECODE_BADDEBT = 'badcustomer'; // Abandoned remain - bad customer
|
||||
const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandoned remain - bank charge
|
||||
const CLOSECODE_OTHER = 'other'; // Abandoned remain - other
|
||||
|
||||
const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other
|
||||
const CLOSECODE_ABANDONED = 'abandon'; // Abandoned - other
|
||||
const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice
|
||||
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ class Facture extends CommonInvoice
|
|||
$previousdaynextdatewhen = dol_time_plus_duree($nextdatewhen, -1, 'd');
|
||||
}
|
||||
|
||||
if (!empty($_facrec->frequency)) { // Invoice are created on same thirdparty than template when there is a recurrence, but not necessarly when there is no recurrence.
|
||||
if (!empty($_facrec->frequency)) { // Invoice are created on same thirdparty than template when there is a recurrence, but not necessarily when there is no recurrence.
|
||||
$this->socid = $_facrec->socid;
|
||||
}
|
||||
$this->entity = $_facrec->entity; // Invoice created in same entity than template
|
||||
|
|
@ -1278,7 +1278,7 @@ class Facture extends CommonInvoice
|
|||
continue;
|
||||
}
|
||||
|
||||
// Bloc to update dates of service (month by month only if previously filled and similare to start and end of month)
|
||||
// Block to update dates of service (month by month only if previously filled and similar to start and end of month)
|
||||
// If it's a service with start and end dates
|
||||
if (getDolGlobalString('INVOICE_AUTO_NEXT_MONTH_ON_LINES') && !empty($line->date_start) && !empty($line->date_end)) {
|
||||
// Get the dates
|
||||
|
|
@ -2927,13 +2927,13 @@ class Facture extends CommonInvoice
|
|||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Tag the invoice as paid completely (if close_code is filled) => this->fk_statut=2, this->paye=1
|
||||
* or partialy (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
||||
* or partially (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
||||
*
|
||||
* @deprecated
|
||||
* @see setPaid()
|
||||
* @param User $user Object user that modify
|
||||
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
||||
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
||||
* @param string $close_code Code set when forcing to set the invoice as fully paid while in practice it is incomplete (because of a discount (fr:escompte) for instance)
|
||||
* @param string $close_note Comment set when forcing to set the invoice as fully paid while in practice it is incomplete (because of a discount (fr:escompte) for instance)
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function set_paid($user, $close_code = '', $close_note = '')
|
||||
|
|
@ -2949,8 +2949,8 @@ class Facture extends CommonInvoice
|
|||
* - or partially (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
||||
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
|
||||
* @param string $close_code Code set when forcing to set the invoice as fully paid while in practice it is incomplete (because of a discount (fr:escompte) for instance)
|
||||
* @param string $close_note Comment set when forcing to set the invoice as fully paid while in practice it is incomplete (because of a discount (fr:escompte) for instance)
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function setPaid($user, $close_code = '', $close_note = '')
|
||||
|
|
@ -3007,9 +3007,9 @@ class Facture extends CommonInvoice
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Tag la facture comme non payee completement + appel trigger BILL_UNPAYED
|
||||
* Fonction utilisee quand un paiement prelevement est refuse,
|
||||
* ou quand une facture annulee et reouverte.
|
||||
* Tags the invoice as incompletely paied and call the trigger BILL_UNPAYED
|
||||
* This method is used when a direct debit (fr:prelevement) is refused
|
||||
* or when a canceled invoice is reopened.
|
||||
*
|
||||
* @deprecated
|
||||
* @see setUnpaid()
|
||||
|
|
@ -3024,9 +3024,9 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
/**
|
||||
* Tag la facture comme non payee completement + appel trigger BILL_UNPAYED
|
||||
* Fonction utilisee quand un paiement prelevement est refuse,
|
||||
* ou quand une facture annulee et reouverte.
|
||||
* Tag the invoice as incompletely paid and call the trigger BILL_UNPAYED
|
||||
* This method is used when a direct debit (fr:prelevement) is refused
|
||||
* or when a canceled invoice is reopened.
|
||||
*
|
||||
* @param User $user Object user that change status
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
@ -3734,9 +3734,9 @@ class Facture extends CommonInvoice
|
|||
/**
|
||||
* Add an invoice line into database (linked to product/service or not).
|
||||
* Note: ->thirdparty must be defined.
|
||||
* Les parametres sont deja cense etre juste et avec valeurs finales a l'appel
|
||||
* de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini
|
||||
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit)
|
||||
* Les parameters sont deja cense etre juste et avec valeurs finales a l'appel
|
||||
* de cette method. Aussi, pour le taux tva, il doit deja avoir ete defini
|
||||
* par l'appelant par la method get_default_tva(societe_vendeuse,societe_acheteuse,produit)
|
||||
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
|
||||
*
|
||||
* @param string $desc Description of line
|
||||
|
|
@ -3982,7 +3982,7 @@ class Facture extends CommonInvoice
|
|||
$this->line->fk_prev_id = $fk_prev_id;
|
||||
$this->line->fk_unit = $fk_unit;
|
||||
|
||||
// infos marge
|
||||
// infos margin
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
|
|
@ -4011,7 +4011,7 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
}
|
||||
|
||||
// Mise a jour informations denormalisees au niveau de la facture meme
|
||||
// Mise a jour information denormalisees au niveau de la facture meme
|
||||
if (empty($noupdateafterinsertline)) {
|
||||
$result = $this->update_price(1, 'auto', 0, $mysoc); // The addline method is designed to add line from user input so total calculation with update_price must be done using 'auto' mode.
|
||||
}
|
||||
|
|
@ -4051,7 +4051,7 @@ class Facture extends CommonInvoice
|
|||
* @param double $txlocaltax1 Local tax 1 rate
|
||||
* @param double $txlocaltax2 Local tax 2 rate
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param int $info_bits Miscellaneous informations
|
||||
* @param int $info_bits Miscellaneous information
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines).
|
||||
* @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules)
|
||||
|
|
@ -4701,8 +4701,8 @@ class Facture extends CommonInvoice
|
|||
*
|
||||
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||
* @param int $draft 0=not draft, 1=draft
|
||||
* @param User $excluser Objet user to exclude
|
||||
* @param int $socid Id third pary
|
||||
* @param User $excluser Object user to exclude
|
||||
* @param int $socid Id third party
|
||||
* @param int $limit For pagination
|
||||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
|
|
@ -4779,7 +4779,7 @@ class Facture extends CommonInvoice
|
|||
/**
|
||||
* Return list of invoices qualified to be replaced by another invoice.
|
||||
* Invoices matching the following rules are returned:
|
||||
* (Status validated or abandonned for a reason 'other') + not payed + no payment at all + not already replaced
|
||||
* (Status validated or abandoned for a reason 'other') + not paid + no payment at all + not already replaced
|
||||
*
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
|
|
@ -4833,7 +4833,7 @@ class Facture extends CommonInvoice
|
|||
/**
|
||||
* 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 partiely) + not already replaced + not already a credit note
|
||||
* (validated + payment on process) or classified (paid completely or paid partiely) + not already replaced + not already a credit note
|
||||
*
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array|int Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
|
|
@ -4855,13 +4855,13 @@ class Facture extends CommonInvoice
|
|||
// $sql.= " WHERE f.fk_statut >= 1";
|
||||
// $sql.= " AND (f.paye = 1"; // Classee payee completement
|
||||
// $sql.= " OR f.close_code IS NOT NULL)"; // Classee payee partiellement
|
||||
$sql .= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de remplacement
|
||||
$sql .= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de replacement
|
||||
$sql .= " AND f.type <> ".self::TYPE_CREDIT_NOTE; // Exclude credit note invoices from selection
|
||||
|
||||
if (getDolGlobalString('INVOICE_USE_SITUATION_CREDIT_NOTE')) {
|
||||
// Keep invoices that are not situation invoices or that are the last in serie if it is a situation invoice
|
||||
// Keep invoices that are not situation invoices or that are the last in series if it is a situation invoice
|
||||
$sql .= " AND (f.type <> ".self::TYPE_SITUATION." OR f.rowid IN ";
|
||||
$sql .= '(SELECT MAX(fs.rowid)'; // This select returns several ID becasue of the group by later
|
||||
$sql .= '(SELECT MAX(fs.rowid)'; // This select returns several ID because of the group by later
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as fs";
|
||||
$sql .= " WHERE fs.entity IN (".getEntity('invoice').")";
|
||||
$sql .= " AND fs.type = ".self::TYPE_SITUATION;
|
||||
|
|
@ -5385,7 +5385,7 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a thirdparty id with another one.
|
||||
* Replace a thirdparty id with another one.
|
||||
*
|
||||
* @param DoliDB $dbs Database handler, because function is static we name it $dbs not $db to avoid breaking coding test
|
||||
* @param int $origin_id Old thirdparty id
|
||||
|
|
@ -5402,7 +5402,7 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
/**
|
||||
* Function used to replace a product id with another one.
|
||||
* Replace a product id with another one.
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $origin_id Old product id
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* \file htdocs/compta/facture/class/facturestats.class.php
|
||||
* \ingroup factures
|
||||
* \brief Fichier de la classe de gestion des stats des factures
|
||||
* \brief File with class for managing the invoice statistics
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ $sql .= ' f.fk_fac_rec_source,';
|
|||
$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
|
||||
$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
|
||||
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0).
|
||||
// A Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
||||
// A Better solution to be able to sort on already paid or remain to pay is to store amount_payed in a denormalized field.
|
||||
// We disable this. It create a bug when searching with sall and sorting on status. Also it create performance troubles.
|
||||
/*
|
||||
if (!$sall) {
|
||||
|
|
@ -783,10 +783,10 @@ if ($search_status != '-1' && $search_status != '') {
|
|||
$sql .= " AND f.fk_statut = 1"; // unpayed
|
||||
}
|
||||
if ($search_status == '2') {
|
||||
$sql .= " AND f.fk_statut = 2"; // payed Not that some corrupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means payed too but should not happend. If yes, reopen and reclassify billed)
|
||||
$sql .= " AND f.fk_statut = 2"; // paid Not that some corrupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means paid too but should not happen. If yes, reopen and reclassify billed)
|
||||
}
|
||||
if ($search_status == '3') {
|
||||
$sql .= " AND f.fk_statut = 3"; // abandonned
|
||||
$sql .= " AND f.fk_statut = 3"; // abandoned
|
||||
}
|
||||
} else {
|
||||
$sql .= " AND f.fk_statut IN (".$db->sanitize($db->escape($search_status)).")"; // When search_status is '1,2' for example
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
/**
|
||||
* \file htdocs/compta/facture/prelevement.php
|
||||
* \ingroup facture
|
||||
* \brief Management of direct debit order or credit tranfer of invoices
|
||||
* \brief Management of direct debit order or credit transfer of invoices
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
|
@ -287,8 +287,8 @@ if ($object->id > 0) {
|
|||
|
||||
if ($type == 'bank-transfer') {
|
||||
if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { // Not recommended
|
||||
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
} else {
|
||||
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS PAID)%')";
|
||||
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS PAID)%')";
|
||||
|
|
@ -300,8 +300,8 @@ if ($object->id > 0) {
|
|||
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
} else {
|
||||
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { // Not recommended
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be subtracted to payments only and not to total of final invoice
|
||||
} else {
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
|
||||
|
|
@ -768,7 +768,7 @@ if ($object->id > 0) {
|
|||
print '</form>';
|
||||
|
||||
if (getDolGlobalString('STRIPE_SEPA_DIRECT_DEBIT_SHOW_OLD_BUTTON')) { // This is hidden, prefer to use mode enabled with STRIPE_SEPA_DIRECT_DEBIT
|
||||
// TODO Replace this with a checkbox for each payment mode: "Send request to XXX immediatly..."
|
||||
// TODO Replace this with a checkbox for each payment mode: "Send request to XXX immediately..."
|
||||
print "<br>";
|
||||
//add stripe sepa button
|
||||
$buttonlabel = $langs->trans("MakeWithdrawRequestStripe");
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||
print '<td class="linkedcol-amount right nowraponall">';
|
||||
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
|
||||
if ($objectlink->statut != 3) {
|
||||
// If not abandonned
|
||||
// If not abandoned
|
||||
$total += $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ class Localtax extends CommonObject
|
|||
|
||||
|
||||
/**
|
||||
* Hum la fonction s'appelle 'Solde' elle doit a mon avis calcluer le solde de localtax, non ?
|
||||
* Hum la function s'appelle 'Solde' elle doit a mon avis calcluer le solde de localtax, non ?
|
||||
*
|
||||
* @param int $year Year
|
||||
* @return int ???
|
||||
|
|
@ -570,7 +570,7 @@ class Localtax extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Update the link betwen localtax payment and the line into llx_bank
|
||||
* Update the link between localtax payment and the line into llx_bank
|
||||
*
|
||||
* @param int $id Id bank account
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if ($result) {
|
|||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="nowrap" align="left">'.$langs->trans("Ref").'</td>';
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ if (empty($reshook)) {
|
|||
$facid = $key;
|
||||
if (is_numeric($amount) && $amount != 0) {
|
||||
if ($invoiceid != 0) {
|
||||
$invoiceid = -1; // There is more than one invoice payed by this payment
|
||||
$invoiceid = -1; // There is more than one invoice paid by this payment
|
||||
} else {
|
||||
$invoiceid = $facid;
|
||||
}
|
||||
|
|
@ -607,7 +607,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||
//print '<tr><td colspan="3">';
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ if ($resql) {
|
|||
// Expected to pay
|
||||
print '<td class="right"><span class="amount">'.price($objp->total_ttc).'</span></td>';
|
||||
|
||||
// Amount payed
|
||||
// Amount paid
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount).'</span></td>';
|
||||
|
||||
// Remain to pay
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ class RemiseCheque extends CommonObject
|
|||
/**
|
||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||
*
|
||||
* @param User $user Objet user
|
||||
* @param User $user Object user
|
||||
* @param string $type Type of payment mode deposit ('CHQ', 'TRA', ...)
|
||||
* @return WorkboardResponse|int Return integer <0 if KO, WorkboardResponse if OK
|
||||
*/
|
||||
|
|
@ -526,7 +526,7 @@ class RemiseCheque extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Charge indicateurs this->nb de tableau de bord
|
||||
* Load indicators this->nb for the state board
|
||||
*
|
||||
* @param string $type Type of payment mode deposit ('CHQ', 'TRA', ...)
|
||||
* @return int Return integer <0 if ko, >0 if ok
|
||||
|
|
@ -647,7 +647,7 @@ class RemiseCheque extends CommonObject
|
|||
/**
|
||||
* Mets a jour le montant total
|
||||
*
|
||||
* @return int 0 en cas de succes
|
||||
* @return int 0 en cas de success
|
||||
*/
|
||||
public function updateAmount()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ foreach ($arrayofpaymentmodetomanage as $val) {
|
|||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>';
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ class Paiement extends CommonObject
|
|||
* For payment of a customer invoice, amounts are positive, for payment of credit note, amounts are negative
|
||||
*
|
||||
* @param User $user Object user
|
||||
* @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more
|
||||
* @param int $closepaidinvoices 1=Also close paid invoices to paid, 0=Do nothing more
|
||||
* @param Societe $thirdparty Thirdparty
|
||||
* @return int id of created payment, < 0 if error
|
||||
*/
|
||||
|
|
@ -373,7 +373,7 @@ class Paiement extends CommonObject
|
|||
$invoice = new Facture($this->db);
|
||||
$invoice->fetch($facid);
|
||||
|
||||
// If we want to closed payed invoices
|
||||
// If we want to closed paid invoices
|
||||
if ($closepaidinvoices) {
|
||||
$paiement = $invoice->getSommePaiement();
|
||||
$creditnotes = $invoice->getSumCreditNotesUsed();
|
||||
|
|
@ -798,7 +798,7 @@ class Paiement extends CommonObject
|
|||
);
|
||||
}
|
||||
|
||||
// Add link to the Direct Debit if invoice redused ('InvoiceRefused') in bank_url
|
||||
// Add link to the Direct Debit if invoice refused ('InvoiceRefused') in bank_url
|
||||
if (!$error && $label == '(InvoiceRefused)') {
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
|
|
@ -1004,7 +1004,7 @@ class Paiement extends CommonObject
|
|||
/**
|
||||
* Information sur l'objet
|
||||
*
|
||||
* @param int $id id du paiement dont il faut afficher les infos
|
||||
* @param int $id id du paiement don't il faut afficher les infos
|
||||
* @return void
|
||||
*/
|
||||
public function info($id)
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ $bankline = new AccountLine($db);
|
|||
llxHeader('', $langs->trans('ListPayment'));
|
||||
|
||||
if (GETPOST("orphelins", "alpha")) {
|
||||
// Payments not linked to an invoice. Should not happend. For debug only.
|
||||
// Payments not linked to an invoice. Should not happen. For debug only.
|
||||
$sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement as num_payment,";
|
||||
$sql .= " c.code as paiement_code";
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ if ($action == 'create') {
|
|||
$num = 1;
|
||||
$i = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ if ($action == 'create') {
|
|||
$num = 1;
|
||||
$i = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ $confirm = GETPOST('confirm');
|
|||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
// TODO ajouter regle pour restreindre acces paiement
|
||||
// TODO ajouter regle pour restreindre access paiement
|
||||
//$result = restrictedArea($user, 'facture', $id,'');
|
||||
|
||||
$object = new PaymentVAT($db);
|
||||
|
|
@ -210,7 +210,7 @@ print dol_get_fiche_end();
|
|||
|
||||
|
||||
/*
|
||||
* List of social contributions payed
|
||||
* List of social contributions paid
|
||||
*/
|
||||
|
||||
$disable_delete = 0;
|
||||
|
|
@ -257,7 +257,7 @@ if ($resql) {
|
|||
print '<td class="right"><span class="amount">'.price($objp->tva_amount).'</span></td>';
|
||||
// Status
|
||||
print '<td class="center">'.$tva->getLibStatut(4, $objp->amount).'</td>';
|
||||
// Amount payed
|
||||
// Amount paid
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount).'</span></td>';
|
||||
print "</tr>\n";
|
||||
if ($objp->paye == 1) { // If at least one invoice is paid, disable delete
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ if (isModEnabled('supplier_invoice')) {
|
|||
$invoicestatic->id = $obj->rowid;
|
||||
$invoicestatic->ref = $obj->ref;
|
||||
$invoicestatic->status = $obj->fk_statut;
|
||||
$invoicestatic->statut = $obj->fk_statut; // For backward comaptibility
|
||||
$invoicestatic->statut = $obj->fk_statut; // For backward compatibility
|
||||
$invoicestatic->paye = $obj->paye;
|
||||
$invoicestatic->type = $obj->type;
|
||||
$invoicestatic->date = $db->jdate($obj->datef);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
|
|||
$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist'));
|
||||
|
||||
$type = $object->type;
|
||||
// chek if salary pl
|
||||
// check if salary pl
|
||||
$salaryBonPl = $object->checkIfSalaryBonPrelevement();
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
|
|
@ -136,7 +136,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Fichier invalide",LOG_WARNING);
|
||||
dol_syslog("File invalid",LOG_WARNING);
|
||||
$mesg='BadFile';
|
||||
}*/
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ if ($id > 0 || $ref) {
|
|||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Donwload file
|
||||
// Download file
|
||||
print '<tr><td class="titlefieldcreate">';
|
||||
$labelfororderfield = 'WithdrawalFile';
|
||||
if ($object->type == 'bank-transfer') {
|
||||
|
|
@ -529,7 +529,7 @@ if ($id > 0 || $ref) {
|
|||
}
|
||||
print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder liste centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd, '', $sortfield, $sortorder);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class BonPrelevement extends CommonObject
|
|||
* 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0')
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage)
|
||||
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200'
|
||||
|
|
@ -661,11 +661,11 @@ class BonPrelevement extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Set withdrawal to transmited status
|
||||
* Set withdrawal to transmitted status
|
||||
*
|
||||
* @param User $user Id of user
|
||||
* @param int $date Date of action
|
||||
* @param string $method Method of transmision to bank (0=Internet, 1=Api...)
|
||||
* @param string $method Method of transmission to bank (0=Internet, 1=Api...)
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
public function set_infotrans($user, $date, $method)
|
||||
|
|
@ -1220,7 +1220,7 @@ class BonPrelevement extends CommonObject
|
|||
if (!$error) {
|
||||
$ref = substr($year, -2).$month;
|
||||
|
||||
// Get next free nunber for the ref of bon prelevement
|
||||
// Get next free number for the ref of bon prelevement
|
||||
$sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX"
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons";
|
||||
$sql .= " WHERE ref LIKE '_".$this->db->escape($ref)."%'";
|
||||
|
|
@ -1725,7 +1725,7 @@ class BonPrelevement extends CommonObject
|
|||
$i = 0;
|
||||
|
||||
/*
|
||||
* Section Debitor (sepa Debiteurs bloc lines)
|
||||
* Section Debitor (sepa Debiteurs block lines)
|
||||
*/
|
||||
|
||||
$sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||
|
|
@ -1779,7 +1779,7 @@ class BonPrelevement extends CommonObject
|
|||
$result = -2;
|
||||
}
|
||||
|
||||
// Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf
|
||||
// Define $fileEmetteurSection. Start of block PmtInf. Will contains all $nbtotalDrctDbtTxInf
|
||||
if ($result != -2) {
|
||||
$fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format, $type, $fk_bank_account);
|
||||
}
|
||||
|
|
@ -1843,7 +1843,7 @@ class BonPrelevement extends CommonObject
|
|||
$i = 0;
|
||||
|
||||
/*
|
||||
* Section Creditor (sepa Crediteurs bloc lines)
|
||||
* Section Creditor (sepa Crediteurs block lines)
|
||||
*/
|
||||
if (!empty($user_dest)) {
|
||||
$sql = "SELECT u.rowid as userId, u.address, u.zip, u.town, c.code as country_code, CONCAT(u.firstname,' ',u.lastname) as nom,";
|
||||
|
|
@ -1915,7 +1915,7 @@ class BonPrelevement extends CommonObject
|
|||
fputs($this->file, 'ERROR CREDITOR '.$sql.$CrLf); // CREDITORS = Suppliers
|
||||
$result = -2;
|
||||
}
|
||||
// Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf
|
||||
// Define $fileEmetteurSection. Start of block PmtInf. Will contains all $nbtotalDrctDbtTxInf
|
||||
if ($result != -2) {
|
||||
$fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format, $type);
|
||||
}
|
||||
|
|
@ -1959,7 +1959,7 @@ class BonPrelevement extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
// Build file for Other Countries with unknow format
|
||||
// Build file for Other Countries with unknown format
|
||||
if (!$found) {
|
||||
if ($type != 'bank-transfer') {
|
||||
$sql = "SELECT pl.amount";
|
||||
|
|
@ -2667,7 +2667,7 @@ class BonPrelevement extends CommonObject
|
|||
/**
|
||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||
*
|
||||
* @param User $user Objet user
|
||||
* @param User $user Object user
|
||||
* @param string $mode Mode 'direct_debit' or 'credit_transfer'
|
||||
* @return WorkboardResponse|int Return integer <0 if KO, WorkboardResponse if OK
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class RejetPrelevement
|
|||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
* @param User $user Objet user
|
||||
* @param User $user Object user
|
||||
* @param string $type Type ('direct-debit' for direct debit or 'bank-transfer' for credit transfer)
|
||||
*/
|
||||
public function __construct($db, $user, $type)
|
||||
|
|
@ -299,7 +299,7 @@ class RejetPrelevement
|
|||
dol_syslog("RejetPrelevement::_send_email Erreur envoi email");
|
||||
}
|
||||
} else {
|
||||
dol_syslog("RejetPrelevement::_send_email Userid invalide");
|
||||
dol_syslog("RejetPrelevement::_send_email Userid invalid");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circl
|
|||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="liste centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* \file htdocs/compta/prelevement/factures.php
|
||||
* \ingroup prelevement
|
||||
* \brief Page list of invoice paied by direct debit or credit transfer
|
||||
* \brief Page list of invoice paid by direct debit or credit transfer
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
|
@ -299,7 +299,7 @@ if ($resql) {
|
|||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="liste centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(($salaryBonPl ? "Salary" : "Bill"), $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ if ($resql) {
|
|||
print_barre_liste($langs->trans("Rejects"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Line").'</td><td>'.$langs->trans("ThirdParty").'</td><td class="right">'.$langs->trans("Amount").'</td>';
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ if ($id > 0 || $ref) {
|
|||
print load_fiche_titre($langs->trans("StatisticsByLineStatus"), '', '');
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Status").'</td><td class="right">'.$langs->trans("Amount").'</td><td class="right">%</td></tr>';
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ if ($id) {
|
|||
print '<input type="hidden" name="action" value="confirm_rejet">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ if ($id > 0) {
|
|||
if (empty($TData)) {
|
||||
print '<tr class="oddeven"><td colspan="7">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
} else {
|
||||
// Sort array by date ASC to calucalte balance
|
||||
// Sort array by date ASC to calculate balance
|
||||
$TData = dol_sort_array($TData, 'datefieldforsort', 'ASC');
|
||||
|
||||
// Balance calculation
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ for ($annee = $year_start; $annee <= $year_end_for_table; $annee++) {
|
|||
}
|
||||
print '</tr>';
|
||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
||||
// Loop on each year to ouput
|
||||
// Loop on each year to output
|
||||
for ($annee = $year_start; $annee <= $year_end_for_table; $annee++) {
|
||||
print '<td class="liste_titre" align="center">';
|
||||
$htmlhelp = '';
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
// Loop on each custom group of accounts
|
||||
foreach ($cats as $cat) {
|
||||
if (!empty($cat['category_type'])) {
|
||||
// category calculed
|
||||
// category calculated
|
||||
// When we enter here, $sommes was filled by group of accounts
|
||||
|
||||
$formula = $cat['formula'];
|
||||
|
|
@ -491,7 +491,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
}
|
||||
|
||||
// Set value into column N and month M ($totCat)
|
||||
// This make 12 calls for each accountancy account (12 monthes M)
|
||||
// This make 12 calls for each accountancy account (12 months M)
|
||||
foreach ($cpts as $i => $cpt) { // Loop on each account.
|
||||
// We make 1 loop for each account because we may want detail per account.
|
||||
// @todo Optimize to ask a 'group by' account and a filter with account in (..., ...) in request
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ if ($id > 0) {
|
|||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder paymenttable">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ class Cchargesociales
|
|||
}*/
|
||||
|
||||
/**
|
||||
* Return a link to the user card (with optionaly the picto)
|
||||
* Return a link to the user card (with optionally the picto)
|
||||
* Use this->id,this->lastname, this->firstname
|
||||
*
|
||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
/**
|
||||
* \file htdocs/compta/sociales/class/chargesociales.class.php
|
||||
* \ingroup facture
|
||||
* \brief Fichier de la classe des charges sociales
|
||||
* \brief File for the ChargesSociales class
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion des paiements des charges
|
||||
* La tva collectee n'est calculee que sur les factures payees.
|
||||
* Class for managing the social charges.
|
||||
* The collected VAT is computed only on the paid invoices/charges
|
||||
*/
|
||||
class ChargeSociales extends CommonObject
|
||||
{
|
||||
|
|
@ -236,7 +236,7 @@ class ChargeSociales extends CommonObject
|
|||
|
||||
$now = dol_now();
|
||||
|
||||
// Nettoyage parametres
|
||||
// Nettoyage parameters
|
||||
$newamount = price2num($this->amount, 'MT');
|
||||
|
||||
if (!$this->check()) {
|
||||
|
|
@ -518,7 +518,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 paid if you have it, 1 otherwise)
|
||||
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function getLibStatut($mode = 0, $alreadypaid = -1)
|
||||
|
|
@ -532,7 +532,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 paid if you have it, 1 otherwise)
|
||||
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0, $alreadypaid = -1)
|
||||
|
|
@ -575,7 +575,7 @@ class ChargeSociales extends CommonObject
|
|||
|
||||
|
||||
/**
|
||||
* Return a link to the object card (with optionaly the picto)
|
||||
* Return a link to the object card (with optionally the picto)
|
||||
*
|
||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||
* @param string $option On what the link point to ('nolink', ...)
|
||||
|
|
@ -695,7 +695,7 @@ class ChargeSociales extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Charge les informations d'ordre info dans l'objet entrepot
|
||||
* Charge l'information d'ordre info dans l'objet entrepot
|
||||
*
|
||||
* @param int $id Id of social contribution
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class PaymentSocialContribution extends CommonObject
|
|||
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
|
||||
// Validate parametres
|
||||
// Validate parameters
|
||||
if (!$this->datepaye) {
|
||||
$this->error = 'ErrorBadValueForParameterCreatePaymentSocialContrib';
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ if ($id > 0) {
|
|||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder paymenttable">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class PaymentVAT extends CommonObject
|
|||
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
|
||||
// Validate parametres
|
||||
// Validate parameters
|
||||
if (!$this->datepaye) {
|
||||
$this->error = 'ErrorBadValueForParameterCreatePaymentVAT';
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class Tva extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Tag TVA as payed completely
|
||||
* Tag TVA as paid completely
|
||||
*
|
||||
* @param User $user Object user making change
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
@ -295,7 +295,7 @@ class Tva extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove tag payed on TVA
|
||||
* Remove tag paid on TVA
|
||||
*
|
||||
* @param User $user Object user making change
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
|
|
@ -486,7 +486,7 @@ class Tva extends CommonObject
|
|||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* VAT payed
|
||||
* VAT paid
|
||||
*
|
||||
* @param int $year Year
|
||||
* @return double Amount
|
||||
|
|
@ -521,7 +521,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
|
||||
|
|
@ -639,7 +639,7 @@ class Tva extends CommonObject
|
|||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO should be called 'payment_vat'
|
||||
|
||||
// Call trigger
|
||||
//XXX: Should be done just befor commit no ?
|
||||
//XXX: Should be done just before commit no ?
|
||||
$result = $this->call_trigger('TVA_ADDPAYMENT', $user);
|
||||
if ($result < 0) {
|
||||
$this->id = 0;
|
||||
|
|
@ -822,7 +822,7 @@ class Tva extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Informations of vat payment object
|
||||
* Information of vat payment object
|
||||
*
|
||||
* @param int $id Id of vat payment
|
||||
* @return void
|
||||
|
|
@ -857,7 +857,7 @@ class Tva extends CommonObject
|
|||
* Return the label of the VAT status f object
|
||||
*
|
||||
* @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 recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function getLibStatut($mode = 0, $alreadypaid = -1)
|
||||
|
|
@ -871,7 +871,7 @@ class Tva 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 recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0, $alreadypaid = -1)
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
|||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
|
|||
print '<input type="hidden" name="page" value="' . $page . '">';
|
||||
print '<input type="hidden" name="mode" value="' . $mode . '">';
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
|
|
|
|||
Loading…
Reference in a new issue