clean indent in compta, contact directory
This commit is contained in:
parent
c44425d0a0
commit
a1f0245c79
@ -186,7 +186,7 @@
|
|||||||
<!-- Check indent are done with spaces and with correct number -->
|
<!-- Check indent are done with spaces and with correct number -->
|
||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
<!-- TODO Enable this
|
|
||||||
<arg name="tab-width" value="4"/>
|
<arg name="tab-width" value="4"/>
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
<properties>
|
<properties>
|
||||||
@ -194,7 +194,7 @@
|
|||||||
<property name="tabIndent" value="true"/>
|
<property name="tabIndent" value="true"/>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
-->
|
|
||||||
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014-2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -815,7 +815,9 @@ if (empty($reshook))
|
|||||||
$sql .= " WHERE fk_facture = " . $object->id;
|
$sql .= " WHERE fk_facture = " . $object->id;
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (!empty($resql)) {
|
if (!empty($resql)) {
|
||||||
while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc;
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
|
$total_creditnote_and_deposit += $obj->amount_ttc;
|
||||||
|
}
|
||||||
} else dol_print_error($db);
|
} else dol_print_error($db);
|
||||||
|
|
||||||
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||||
@ -3274,11 +3276,11 @@ if ($action == 'create')
|
|||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
||||||
$liste = ModelePDFFactures::liste_modeles($db);
|
$liste = ModelePDFFactures::liste_modeles($db);
|
||||||
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)){ // Hidden conf
|
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)){
|
||||||
|
// Hidden conf
|
||||||
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
||||||
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$curent = $conf->global->FACTURE_ADDON_PDF;
|
$curent = $conf->global->FACTURE_ADDON_PDF;
|
||||||
}
|
}
|
||||||
print $form->selectarray('model', $liste, $curent);
|
print $form->selectarray('model', $liste, $curent);
|
||||||
@ -3803,8 +3805,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($usercancreate)
|
if ($usercancreate)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -529,8 +529,7 @@ class Invoices extends DolibarrApi
|
|||||||
// update bank account
|
// update bank account
|
||||||
if (!empty($this->invoice->fk_account))
|
if (!empty($this->invoice->fk_account))
|
||||||
{
|
{
|
||||||
if($this->invoice->setBankAccount($this->invoice->fk_account) == 0)
|
if ($this->invoice->setBankAccount($this->invoice->fk_account) == 0) {
|
||||||
{
|
|
||||||
throw new RestException(400, $this->invoice->error);
|
throw new RestException(400, $this->invoice->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2587,10 +2587,12 @@ class Facture extends CommonInvoice
|
|||||||
$next_invoice->brouillon = 1;
|
$next_invoice->brouillon = 1;
|
||||||
foreach ($next_invoice->lines as $line)
|
foreach ($next_invoice->lines as $line)
|
||||||
{
|
{
|
||||||
$result = $next_invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent,
|
$result = $next_invoice->updateline(
|
||||||
|
$line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent,
|
||||||
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
||||||
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
||||||
$line->fk_unit);
|
$line->fk_unit
|
||||||
|
);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -163,9 +163,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -1242,8 +1242,9 @@ else
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -223,8 +223,9 @@ $sql.= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,
|
|||||||
$sql.= " f.datec, f.tms,";
|
$sql.= " f.datec, f.tms,";
|
||||||
$sql.= " f.fk_cond_reglement, f.fk_mode_reglement";
|
$sql.= " f.fk_cond_reglement, f.fk_mode_reglement";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['label']))
|
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
@ -632,8 +633,7 @@ if ($resql)
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['status']['checked']))
|
if (! empty($arrayfields['status']['checked'])) {
|
||||||
{
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $invoicerectmp->getLibStatut(3, 0);
|
print $invoicerectmp->getLibStatut(3, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -400,8 +400,9 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
|
|||||||
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
||||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['label']))
|
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -1352,8 +1353,7 @@ if ($resql)
|
|||||||
|| isset($totalarray['totalttcfield'])
|
|| isset($totalarray['totalttcfield'])
|
||||||
|| isset($totalarray['totalamfield'])
|
|| isset($totalarray['totalamfield'])
|
||||||
|| isset($totalarray['totalrtpfield'])
|
|| isset($totalarray['totalrtpfield'])
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $totalarray['nbfield'])
|
while ($i < $totalarray['nbfield'])
|
||||||
|
|||||||
@ -189,9 +189,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -233,8 +233,6 @@ foreach ($tmp_companies as $value) {
|
|||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
//if (empty($socid))
|
|
||||||
//{
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
@ -274,7 +272,6 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
//}
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -24,11 +24,7 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -40,16 +36,16 @@ $langs->load("bills");
|
|||||||
|
|
||||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
print '<tr class="'.$trclass.'" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" >';
|
||||||
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
print '<td class="linkedcol-element">';
|
||||||
<td class="linkedcol-element"><?php
|
|
||||||
switch ($objectlink->type) {
|
switch ($objectlink->type) {
|
||||||
case Facture::TYPE_REPLACEMENT:
|
case Facture::TYPE_REPLACEMENT:
|
||||||
echo $langs->trans("InvoiceReplacement");
|
echo $langs->trans("InvoiceReplacement");
|
||||||
@ -70,16 +66,16 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
echo $langs->trans("CustomerInvoice");
|
echo $langs->trans("CustomerInvoice");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?></td>
|
print '</td>';
|
||||||
<td class="linkedcol-name nowraponall"><?php echo $objectlink->getNomUrl(1); ?></td>
|
print '<td class="linkedcol-name nowraponall">'.$objectlink->getNomUrl(1).'</td>';
|
||||||
<td class="linkedcol-ref left"><?php echo $objectlink->ref_client; ?></td>
|
print '<td class="linkedcol-ref left">'.$objectlink->ref_client.'</td>';
|
||||||
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||||
<td class="linkedcol-amount right"><?php
|
print '<td class="linkedcol-amount right">';
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$sign = 1;
|
$sign = 1;
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
||||||
if ($objectlink->statut != 3) // If not abandonned
|
if ($objectlink->statut != 3) {
|
||||||
{
|
// If not abandonned
|
||||||
$total = $total + $sign * $objectlink->total_ht;
|
$total = $total + $sign * $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
}
|
}
|
||||||
@ -87,26 +83,23 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
{
|
{
|
||||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||||
}
|
}
|
||||||
} ?></td>
|
}
|
||||||
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
print '</td>';
|
||||||
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
|
||||||
</tr>
|
print '<td class="linkedcol-action right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||||
<?php
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
if (count($linkedObjectBlock) > 1)
|
if (count($linkedObjectBlock) > 1)
|
||||||
{
|
{
|
||||||
?>
|
print '<tr class="liste_total '.(empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':'').'">';
|
||||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
print '<td>'.$langs->trans("Total").'</td>';
|
||||||
<td><?php echo $langs->trans("Total"); ?></td>
|
print '<td></td>';
|
||||||
<td></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="right">'.price($total).'</td>';
|
||||||
<td class="right"><?php echo price($total); ?></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print '</tr>';
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -24,11 +24,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -38,7 +36,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
@ -55,7 +54,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
}
|
||||||
|
?></td>
|
||||||
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -75,6 +75,5 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -1894,8 +1894,8 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||||
*/ $XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
||||||
|
|||||||
@ -749,17 +749,17 @@ if (! empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco
|
|||||||
$sql.= " AND fk_statut in (1,2)";
|
$sql.= " AND fk_statut in (1,2)";
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||||
}
|
} elseif ($modecompta == 'RECETTES-DEPENSES') {
|
||||||
elseif ($modecompta == 'RECETTES-DEPENSES') {
|
|
||||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
||||||
$sql.= " WHERE p.entity IN (".getEntity('donation').")";
|
$sql.= " WHERE p.entity IN (".getEntity('donation').")";
|
||||||
$sql.= " AND fk_statut >= 2";
|
$sql.= " AND fk_statut >= 2";
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end)) {
|
||||||
$sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||||
|
|
||||||
|
|||||||
@ -454,8 +454,9 @@ if ($id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->tax->charges->creer)
|
if ($user->rights->tax->charges->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -241,15 +241,13 @@ if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
{
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="6%" class="right">' . $langs->trans("TurnoverbyVatrate") . '</td>';
|
print '<tr class="liste_titre"><td width="6%" class="right">' . $langs->trans("TurnoverbyVatrate") . '</td>';
|
||||||
print '<td class="left">' . $langs->trans("ProductOrService") . '</td>';
|
print '<td class="left">' . $langs->trans("ProductOrService") . '</td>';
|
||||||
print '<td class="left">' . $langs->trans("Country") . '</td>';
|
print '<td class="left">' . $langs->trans("Country") . '</td>';
|
||||||
$i=0;
|
$i=0;
|
||||||
while($i < 12)
|
while($i < 12) {
|
||||||
{
|
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
|||||||
@ -135,13 +135,15 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (! empty($this->control->tpl['contact_element'])) { ?>
|
<?php
|
||||||
<?php foreach ($this->control->tpl['contact_element'] as $element) { ?>
|
if (! empty($this->control->tpl['contact_element'])) {
|
||||||
<tr>
|
foreach ($this->control->tpl['contact_element'] as $element) {
|
||||||
<td><?php echo $element['linked_element_label']; ?></td>
|
print '<tr>';
|
||||||
<td colspan="3"><?php echo $element['linked_element_value']; ?></td>
|
print '<td>'.$element['linked_element_label'].'</td>';
|
||||||
</tr>
|
print '<td colspan="3">'.$element['linked_element_value'].'</td>';
|
||||||
<?php } } ?>
|
print '</tr>';
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("DolibarrLogin"); ?></td>
|
<td><?php echo $langs->trans("DolibarrLogin"); ?></td>
|
||||||
|
|||||||
@ -24,17 +24,14 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
|
print "<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->\n";
|
||||||
<?php echo $this->control->tpl['showhead']; ?>
|
echo $this->control->tpl['showhead'];
|
||||||
|
|
||||||
<?php
|
|
||||||
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?>
|
if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user'];
|
||||||
<?php if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
||||||
|
|
||||||
<table class="border allwidth">
|
<table class="border allwidth">
|
||||||
|
|
||||||
@ -134,29 +131,27 @@ dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors'
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php echo $this->control->tpl['showend']; ?>
|
<?php echo $this->control->tpl['showend'];
|
||||||
|
|
||||||
<?php if (empty($user->societe_id)) { ?>
|
if (empty($user->societe_id)) {
|
||||||
<div class="tabsAction">
|
print '<div class="tabsAction">';
|
||||||
|
if ($user->rights->societe->contact->creer) {
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
<?php if ($user->rights->societe->contact->creer) { ?>
|
if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
||||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas; ?>"><?php echo $langs->trans('Modify'); ?></a>
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||||
<?php } ?>
|
}
|
||||||
|
|
||||||
<?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
|
if ($user->rights->societe->contact->supprimer) {
|
||||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas; ?>"><?php echo $langs->trans("CreateDolibarrLogin"); ?></a>
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
||||||
<?php } ?>
|
}
|
||||||
|
|
||||||
<?php if ($user->rights->societe->contact->supprimer) { ?>
|
print '</div><br>';
|
||||||
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
}
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div><br>
|
|
||||||
<?php }
|
|
||||||
|
|
||||||
echo $this->control->tpl['actionstodo'];
|
echo $this->control->tpl['actionstodo'];
|
||||||
|
|
||||||
echo $this->control->tpl['actionsdone'];
|
echo $this->control->tpl['actionsdone'];
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user