Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
ac5d2d849b
@ -213,7 +213,7 @@ if ($object->id > 0)
|
||||
$head = facture_prepare_head($object);
|
||||
}
|
||||
|
||||
print dol_get_fiche_head($head, 'standingorders', $title, -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'standingorders', $title, -1, ($type == 'bank-transfer' ? 'supplier_invoice' : 'bill'));
|
||||
|
||||
// Invoice content
|
||||
if ($type == 'bank-transfer') {
|
||||
|
||||
@ -52,9 +52,11 @@ class Conf
|
||||
public $disable_compute;
|
||||
//! Used to store current currency (ISO code like 'USD', 'EUR', ...)
|
||||
public $currency;
|
||||
|
||||
//! Used to store current css (from theme)
|
||||
public $theme; // Contains current theme ("eldy", "auguria", ...)
|
||||
public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
|
||||
|
||||
//! Used to store current menu handler
|
||||
public $standard_menu;
|
||||
// List of activated modules
|
||||
@ -98,6 +100,8 @@ class Conf
|
||||
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
|
||||
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
|
||||
|
||||
public $liste_limit;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@ -4877,7 +4877,7 @@ function price2num($amount, $rounding = '', $option = 0)
|
||||
elseif ($rounding == 'CR') $nbofdectoround = 8;
|
||||
elseif (is_numeric($rounding)) $nbofdectoround = $rounding;
|
||||
//print "RR".$amount.' - '.$nbofdectoround.'<br>';
|
||||
if (dol_strlen($nbofdectoround)) $amount = round($amount, $nbofdectoround); // $nbofdectoround can be 0.
|
||||
if (dol_strlen($nbofdectoround)) $amount = round(is_string($amount) ? (float) $amount : $amount, $nbofdectoround); // $nbofdectoround can be 0.
|
||||
else return 'ErrorBadParameterProvidedToFunction';
|
||||
//print 'SS'.$amount.' - '.$nbofdec.' - '.$dec.' - '.$thousand.' - '.$nbofdectoround.'<br>';
|
||||
|
||||
|
||||
@ -115,6 +115,8 @@ $permissiondellink = $usercancreate; // Used by the include of actions_dellink.i
|
||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
||||
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -183,8 +185,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change)
|
||||
{
|
||||
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) {
|
||||
$langs->load("stocks");
|
||||
if (!$idwarehouse || $idwarehouse == -1)
|
||||
{
|
||||
@ -194,11 +195,9 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$error) {
|
||||
$result = $object->validate($user, '', $idwarehouse);
|
||||
if ($result < 0)
|
||||
{
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
// Define output language
|
||||
@ -220,8 +219,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'confirm_delete' && $confirm == 'yes')
|
||||
{
|
||||
} elseif ($action == 'confirm_delete' && $confirm == 'yes') {
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@ -280,15 +278,13 @@ if (empty($reshook))
|
||||
} elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) {
|
||||
$object->fetch($id);
|
||||
$result = $object->set_paid($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Set supplier ref
|
||||
if ($action == 'setref_supplier' && $usercancreate)
|
||||
{
|
||||
if ($action == 'setref_supplier' && $usercancreate) {
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
|
||||
if ($object->update($user) < 0) {
|
||||
@ -315,8 +311,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// payments conditions
|
||||
if ($action == 'setconditions' && $usercancreate)
|
||||
{
|
||||
if ($action == 'setconditions' && $usercancreate) {
|
||||
$object->fetch($id);
|
||||
$object->cond_reglement_code = 0; // To clean property
|
||||
$object->cond_reglement_id = 0; // To clean property
|
||||
@ -1680,20 +1675,17 @@ if ($action == 'create')
|
||||
$currency_code = $conf->currency;
|
||||
|
||||
$societe = '';
|
||||
if (GETPOST('socid') > 0)
|
||||
{
|
||||
if (GETPOST('socid') > 0) {
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch(GETPOST('socid', 'int'));
|
||||
if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code;
|
||||
}
|
||||
|
||||
if (!empty($origin) && !empty($originid))
|
||||
{
|
||||
if (!empty($origin) && !empty($originid)) {
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = $origin;
|
||||
|
||||
if ($element == 'project')
|
||||
{
|
||||
if ($element == 'project') {
|
||||
$projectid = $originid;
|
||||
$element = 'projet';
|
||||
}
|
||||
@ -2204,8 +2196,7 @@ if ($action == 'create')
|
||||
|
||||
|
||||
// Show origin lines
|
||||
if (is_object($objectsrc))
|
||||
{
|
||||
if (is_object($objectsrc)) {
|
||||
print '<br>';
|
||||
|
||||
$title = $langs->trans('ProductsAndServices');
|
||||
@ -2218,8 +2209,7 @@ if ($action == 'create')
|
||||
print '</table>';
|
||||
}
|
||||
} else {
|
||||
if ($id > 0 || !empty($ref))
|
||||
{
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Fiche en mode visu ou edition */
|
||||
@ -2275,7 +2265,7 @@ if ($action == 'create')
|
||||
$head = facturefourn_prepare_head($object);
|
||||
$titre = $langs->trans('SupplierInvoice');
|
||||
|
||||
print dol_get_fiche_head($head, 'card', $titre, -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'card', $titre, -1, 'supplier_invoice');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
$head = facturefourn_prepare_head($object);
|
||||
|
||||
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ llxHeader('', $title, $helpurl);
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$head = facturefourn_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
||||
|
||||
$totalpaye = $object->getSommePaiement();
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ $maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->globa
|
||||
|
||||
llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');
|
||||
|
||||
print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill');
|
||||
print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invoice');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ $alreadypaid = $object->getSommePaiement();
|
||||
|
||||
$head = facturefourn_prepare_head($object);
|
||||
$titre = $langs->trans('SupplierInvoice');
|
||||
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ if ($object->id > 0)
|
||||
|
||||
$head = facturefourn_prepare_head($object);
|
||||
$titre = $langs->trans('SupplierInvoice');
|
||||
print dol_get_fiche_head($head, 'note', $titre, -1, 'bill');
|
||||
print dol_get_fiche_head($head, 'note', $titre, -1, 'supplier_invoice');
|
||||
|
||||
|
||||
// Supplier invoice card
|
||||
|
||||
@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc
|
||||
ExportDataset_tax_1=Social and fiscal taxes and payments
|
||||
CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>.
|
||||
CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>.
|
||||
CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger.
|
||||
CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger.
|
||||
CalcModeEngagement=Analysis of known recorded payments, even if they are not yet accounted in Ledger.
|
||||
CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table.
|
||||
CalcModeLT1= Mode <b>%sRE on customer invoices - suppliers invoices%s</b>
|
||||
@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary
|
||||
AnnualByCompanies=Balance of income and expenses, by predefined groups of account
|
||||
AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by predefined groups, mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>.
|
||||
AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>.
|
||||
SeeReportInInputOutputMode=See %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger.
|
||||
SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger.
|
||||
SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</b>
|
||||
SeeReportInInputOutputMode=See <b>%sanalysis of payments%s</b> for a calculation based on <b>recorded payments</b> made even if they are not yet accounted in Ledger
|
||||
SeeReportInDueDebtMode=See <b>%sanalysis of recorded documents%s</b> for a calculation based on known <b>recorded documents</b> even if they are not yet accounted in Ledger
|
||||
SeeReportInBookkeepingMode=See <b>%sanalysis of bookeeping ledger table%s</b> for a report based on <b>Bookkeeping Ledger table</b>
|
||||
RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included
|
||||
RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.<br>- It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries. <br>- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation.
|
||||
|
||||
@ -2802,7 +2802,7 @@ if (!function_exists("llxFooter"))
|
||||
|
||||
if (!empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage;
|
||||
if (!empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page;
|
||||
if (!empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit;
|
||||
if (!empty($limit) && $limit != $conf->liste_limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit;
|
||||
|
||||
unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]);
|
||||
unset($_SESSION['lastsearch_page_'.$relativepathstring]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user