Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/admin/taxes.php
This commit is contained in:
commit
78b0585798
@ -141,7 +141,7 @@ else
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
||||||
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||||
@ -169,28 +169,29 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print "<br>\n";
|
print '<br>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
|
// Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="2">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>';
|
print '<td class="titlefield">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="0"'.($tax_mode != 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDefault').'</td>';
|
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="0"'.($tax_mode != 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDefault').'</td>';
|
||||||
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDefaultDesc'));
|
print '<td>'.nl2br($langs->trans('OptionVatDefaultDesc'));
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="1"'.($tax_mode == 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDebitOption').'</td>';
|
print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="1"'.($tax_mode == 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDebitOption').'</td>';
|
||||||
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n";
|
print '<td>'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n";
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print load_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'','');
|
print ' -> '.$langs->trans("SummaryOfVatExigibilityUsedByDefault");
|
||||||
//print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')';
|
//print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td> </td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield"> </td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>';
|
||||||
|
|
||||||
// Products
|
// Products
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("Product").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("Product").'</td>';
|
||||||
@ -235,12 +236,18 @@ else
|
|||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Others params
|
* Others params
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td class="titlefield">' . $langs->trans('Parameters') . '</td>';
|
||||||
|
print '<td><td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ($list as $key)
|
foreach ($list as $key)
|
||||||
|
|||||||
@ -80,6 +80,8 @@ class AgendaEvents extends DolibarrApi
|
|||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result = $this->actioncomm->fetch_optionals();
|
||||||
|
|
||||||
$this->actioncomm->fetchObjectLinked();
|
$this->actioncomm->fetchObjectLinked();
|
||||||
return $this->_cleanObjectDatas($this->actioncomm);
|
return $this->_cleanObjectDatas($this->actioncomm);
|
||||||
}
|
}
|
||||||
@ -319,7 +321,6 @@ class AgendaEvents extends DolibarrApi
|
|||||||
|
|
||||||
unset($object->usermod);
|
unset($object->usermod);
|
||||||
unset($object->libelle);
|
unset($object->libelle);
|
||||||
unset($object->array_options);
|
|
||||||
unset($object->context);
|
unset($object->context);
|
||||||
unset($object->canvas);
|
unset($object->canvas);
|
||||||
unset($object->contact);
|
unset($object->contact);
|
||||||
|
|||||||
@ -89,8 +89,8 @@ $arrayfields=array(
|
|||||||
'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
|
'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
|
||||||
'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||||
'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1),
|
'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1),
|
||||||
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled),
|
'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))),
|
||||||
'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled),
|
'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))),
|
||||||
'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1),
|
'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1),
|
||||||
'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0),
|
'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0),
|
||||||
'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
|
|||||||
@ -447,7 +447,7 @@ else
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax == 0)
|
if ($modetax == 0)
|
||||||
{
|
{
|
||||||
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap" align="right">';
|
||||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
|
|||||||
@ -1078,9 +1078,10 @@ class Contact extends CommonObject
|
|||||||
* @param int $maxlen Max length of
|
* @param int $maxlen Max length of
|
||||||
* @param string $moreparam Add more param into URL
|
* @param string $moreparam Add more param into URL
|
||||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1)
|
function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
@ -1112,13 +1113,16 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$linkstart = '<a href="'.$url.'"';
|
$linkstart = '<a href="'.$url.'"';
|
||||||
$linkclose="";
|
$linkclose="";
|
||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($notooltip)) {
|
||||||
{
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
$label=$langs->trans("ShowContact");
|
{
|
||||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
$label=$langs->trans("ShowContact");
|
||||||
}
|
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
}
|
||||||
$linkclose.= ' class="classfortooltip">';
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
$linkclose.= ' class="classfortooltip"';
|
||||||
|
}
|
||||||
|
$linkclose.='>';
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class mailing_advthirdparties extends MailingTargets
|
|||||||
'source_url' => $this->url($obj->id,'thirdparty'),
|
'source_url' => $this->url($obj->id,'thirdparty'),
|
||||||
'source_id' => $obj->id,
|
'source_id' => $obj->id,
|
||||||
'source_type' => 'thirdparty'
|
'source_type' => 'thirdparty'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,11 +289,11 @@ class mailing_advthirdparties extends MailingTargets
|
|||||||
if ($type=='thirdparty') {
|
if ($type=='thirdparty') {
|
||||||
$companystatic=new Societe($this->db);
|
$companystatic=new Societe($this->db);
|
||||||
$companystatic->fetch($id);
|
$companystatic->fetch($id);
|
||||||
return $companystatic->getNomUrl(0);
|
return $companystatic->getNomUrl(0, '', 0, 1);
|
||||||
} elseif ($type=='contact') {
|
} elseif ($type=='contact') {
|
||||||
$contactstatic=new Contact($this->db);
|
$contactstatic=new Contact($this->db);
|
||||||
$contactstatic->fetch($id);
|
$contactstatic->fetch($id);
|
||||||
return $contactstatic->getNomUrl(0);
|
return $contactstatic->getNomUrl(0, '', 0, '', -1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,73 +71,88 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->langfiles = array("accountancy","compta");
|
$this->langfiles = array("accountancy","compta");
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||||
|
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||||
|
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||||
|
// );
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
$this->const[1] = array(
|
$this->const[1] = array(
|
||||||
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
|
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
|
||||||
"chaine",
|
"chaine",
|
||||||
"1",
|
"1",
|
||||||
"With this constants on, third party code is always required whatever is numbering module behaviour"
|
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[2] = array(
|
$this->const[2] = array(
|
||||||
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",
|
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",
|
||||||
"chaine",
|
"chaine",
|
||||||
"1",
|
"1",
|
||||||
"With this constants on, bank account number is always required"
|
"With this constants on, bank account number is always required", 0, 'current', 1
|
||||||
);
|
);
|
||||||
$this->const[3] = array(
|
$this->const[3] = array(
|
||||||
"ACCOUNTING_ACCOUNT_SUSPENSE",
|
"ACCOUNTING_ACCOUNT_SUSPENSE",
|
||||||
"chaine",
|
"chaine",
|
||||||
"471"
|
"471",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[4] = array(
|
$this->const[4] = array(
|
||||||
"ACCOUNTING_ACCOUNT_TRANSFER_CASH",
|
"ACCOUNTING_ACCOUNT_TRANSFER_CASH",
|
||||||
"chaine",
|
"chaine",
|
||||||
"58"
|
"58",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[5] = array(
|
$this->const[5] = array(
|
||||||
"CHARTOFACCOUNTS",
|
"CHARTOFACCOUNTS",
|
||||||
"chaine",
|
"chaine",
|
||||||
"2"
|
"2",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[6] = array(
|
$this->const[6] = array(
|
||||||
"ACCOUNTING_EXPORT_MODELCSV",
|
"ACCOUNTING_EXPORT_MODELCSV",
|
||||||
"chaine",
|
"chaine",
|
||||||
"1"
|
"1",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[7] = array(
|
$this->const[7] = array(
|
||||||
"ACCOUNTING_LENGTH_GACCOUNT",
|
"ACCOUNTING_LENGTH_GACCOUNT",
|
||||||
"chaine",
|
"chaine",
|
||||||
""
|
"",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[8] = array(
|
$this->const[8] = array(
|
||||||
"ACCOUNTING_LENGTH_AACCOUNT",
|
"ACCOUNTING_LENGTH_AACCOUNT",
|
||||||
"chaine",
|
"chaine",
|
||||||
""
|
"",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[9] = array(
|
$this->const[9] = array(
|
||||||
"ACCOUNTING_LIST_SORT_VENTILATION_TODO",
|
"ACCOUNTING_LIST_SORT_VENTILATION_TODO",
|
||||||
"yesno",
|
"yesno",
|
||||||
"1"
|
"1",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[10] = array(
|
$this->const[10] = array(
|
||||||
"ACCOUNTING_LIST_SORT_VENTILATION_DONE",
|
"ACCOUNTING_LIST_SORT_VENTILATION_DONE",
|
||||||
"yesno",
|
"yesno",
|
||||||
"1"
|
"1",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[11] = array (
|
$this->const[11] = array (
|
||||||
"ACCOUNTING_EXPORT_DATE",
|
"ACCOUNTING_EXPORT_DATE",
|
||||||
"chaine",
|
"chaine",
|
||||||
"%d%m%Y"
|
"%d%m%Y",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[12] = array(
|
$this->const[12] = array(
|
||||||
"ACCOUNTING_EXPORT_SEPARATORCSV",
|
"ACCOUNTING_EXPORT_SEPARATORCSV",
|
||||||
"string",
|
"string",
|
||||||
","
|
",",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
$this->const[13] = array(
|
$this->const[13] = array(
|
||||||
"ACCOUNTING_EXPORT_FORMAT",
|
"ACCOUNTING_EXPORT_FORMAT",
|
||||||
"chaine",
|
"chaine",
|
||||||
"csv"
|
"csv",
|
||||||
|
"", 0, 'current', 0
|
||||||
);
|
);
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Credit=Credit
|
|||||||
Piece=Accounting Doc.
|
Piece=Accounting Doc.
|
||||||
AmountHTVATRealReceived=Net collected
|
AmountHTVATRealReceived=Net collected
|
||||||
AmountHTVATRealPaid=Net paid
|
AmountHTVATRealPaid=Net paid
|
||||||
VATToPay=VAT sells
|
VATToPay=Tax sales
|
||||||
VATReceived=Tax received
|
VATReceived=Tax received
|
||||||
VATToCollect=Tax purchases
|
VATToCollect=Tax purchases
|
||||||
VATSummary=Tax Balance
|
VATSummary=Tax Balance
|
||||||
|
|||||||
@ -158,6 +158,8 @@ if ($action == 'order' && isset($_POST['valid']))
|
|||||||
$line->total_ttc = $line->total_ht + $line->total_tva;
|
$line->total_ttc = $line->total_ht + $line->total_tva;
|
||||||
$line->remise_percent = $obj->remise_percent;
|
$line->remise_percent = $obj->remise_percent;
|
||||||
$line->ref_fourn = $obj->ref_fourn;
|
$line->ref_fourn = $obj->ref_fourn;
|
||||||
|
$line->type = $product->type;
|
||||||
|
$line->fk_unit = $product->fk_unit;
|
||||||
$suppliers[$obj->fk_soc]['lines'][] = $line;
|
$suppliers[$obj->fk_soc]['lines'][] = $line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,7 +204,13 @@ if ($action == 'order' && isset($_POST['valid']))
|
|||||||
$line->remise_percent,
|
$line->remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$line->info_bits
|
$line->type,
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
0,
|
||||||
|
$line->fk_unit
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user