Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e5f712fe14
@ -118,7 +118,7 @@ class Facturation
|
||||
}
|
||||
|
||||
// Define part of HT, VAT, TTC
|
||||
$resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',$product->type);
|
||||
$resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',$product->type,0);
|
||||
|
||||
// Calcul du total ht sans remise
|
||||
$total_ht = $resultarray[0];
|
||||
|
||||
@ -635,7 +635,7 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht != 0) || $price_ht == '')) // Unit price can be 0 but not ''. Also price can be negative for proposal.
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
|
||||
$error++;
|
||||
@ -1191,7 +1191,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Reference
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans("Draft").'</td></tr>';
|
||||
|
||||
|
||||
@ -730,6 +730,8 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$ret=$object->fetch($object->id); // Reload to get new records
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@ -742,7 +744,6 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
$ret=$object->fetch($object->id); // Reload to get new records
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -47,6 +47,8 @@ $id=GETPOST('account', 'int');
|
||||
// Conciliation
|
||||
if ($action == 'rappro' && $user->rights->banque->consolidate)
|
||||
{
|
||||
$error=0;
|
||||
|
||||
// Definition, nettoyage parametres
|
||||
$num_releve=trim($_POST["num_releve"]);
|
||||
|
||||
@ -54,25 +56,37 @@ if ($action == 'rappro' && $user->rights->banque->consolidate)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
|
||||
if (isset($_POST["rowid"]) && is_array($_POST["rowid"]))
|
||||
if (isset($_POST['rowid']) && is_array($_POST['rowid']))
|
||||
{
|
||||
foreach($_POST["rowid"] as $row)
|
||||
foreach($_POST['rowid'] as $row)
|
||||
{
|
||||
if($row > 0)
|
||||
{
|
||||
$result=$bankline->fetch($row);
|
||||
$bankline->num_releve=$num_releve; //$_POST["num_releve"];
|
||||
$result=$bankline->update_conciliation($user,$_POST["cat"]);
|
||||
if ($result < 0) $mesg.=$bankline->error;
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg.=$bankline->error;
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorPleaseTypeBankTransactionReportName").'</div>';
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
header('Location: '.DOL_URL_ROOT.'/compta/bank/rappro?account='.$id); // To avoid to submit twice and allow back
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -80,12 +94,12 @@ if ($action == 'rappro' && $user->rights->banque->consolidate)
|
||||
*/
|
||||
if ($action == 'del')
|
||||
{
|
||||
$accline=new AccountLine($db);
|
||||
$accline->fetch($_GET["rowid"]);
|
||||
$result=$accline->delete();
|
||||
$bankline=new AccountLine($db);
|
||||
$bankline->fetch($_GET["rowid"]);
|
||||
$result=$bankline->delete($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$accline->error);
|
||||
dol_print_error($db,$bankline->error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +214,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
|
||||
print '<form method="post" action="rappro.php?account='.$acct->id.'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?account='.$acct->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"rappro\">";
|
||||
print "<input type=\"hidden\" name=\"account\" value=\"".$acct->id."\">";
|
||||
@ -212,8 +226,7 @@ if ($resql)
|
||||
{
|
||||
print $langs->trans("EventualyAddCategory").': <select class="flat" name="cat">'.$options.'</select><br>';
|
||||
}
|
||||
print $langs->trans("ThenCheckLinesAndConciliate").' ';
|
||||
print "<input class=\"button\" type=\"submit\" value=\"".$langs->trans("Conciliate")."\"><br>";
|
||||
print '<br>'.$langs->trans("ThenCheckLinesAndConciliate").' "'.$langs->trans("Conciliate").'"<br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -230,7 +243,6 @@ if ($resql)
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -265,7 +277,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Number
|
||||
// Type + Number
|
||||
$label=($langs->trans("PaymentType".$objp->type)!="PaymentType".$objp->type)?$langs->trans("PaymentType".$objp->type):$objp->type; // $objp->type is a code
|
||||
if ($label=='SOLD') $label='';
|
||||
print '<td nowrap="nowrap">'.$label.($objp->num_chq?' '.$objp->num_chq:'').'</td>';
|
||||
@ -400,12 +412,12 @@ if ($resql)
|
||||
}
|
||||
|
||||
|
||||
// Affiche zone saisie releve + bouton "Rapprocher"
|
||||
// Show checkbox for conciliation
|
||||
if ($db->jdate($objp->do) <= $now)
|
||||
{
|
||||
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print '<input class="flat" name="rowid[]" type="checkbox" value="'.$objp->rowid.'" size="1">';
|
||||
print '<input class="flat" name="rowid['.$objp->rowid.']" type="checkbox" value="'.$objp->rowid.'" size="1"'.(! empty($_POST['rowid'][$objp->rowid])?' checked="checked"':'').'>';
|
||||
// print '<input class="flat" name="num_releve" type="text" value="'.$objp->num_releve.'" size="8">';
|
||||
// print ' ';
|
||||
// print "<input class=\"button\" type=\"submit\" value=\"".$langs->trans("Conciliate")."\">";
|
||||
@ -429,13 +441,12 @@ if ($resql)
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print "</table><br>\n";
|
||||
|
||||
print "</form>\n";
|
||||
print '<div align="right"><input class="button" type="submit" value="'.$langs->trans("Conciliate").'"></div><br>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
if ($num != 0)
|
||||
{
|
||||
print "</table><br>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -372,7 +372,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
||||
{
|
||||
|
||||
$idprof_mandatory ='SOCIETE_IDPROF'.($i).'_INVOICE_MANDATORY';
|
||||
if (! $object->thirdparty->idprof.$i && ! empty($conf->global->$idprof_mandatory))
|
||||
$idprof='idprof'.$i;
|
||||
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
|
||||
{
|
||||
if (! $error) $langs->load("errors");
|
||||
$error++;
|
||||
|
||||
@ -140,7 +140,7 @@ if (empty($reshook))
|
||||
$object->zip = $_POST["zipcode"];
|
||||
$object->town = $_POST["town"];
|
||||
$object->country_id = $_POST["country_id"];
|
||||
$object->state_id = $_POST["departement_id"];
|
||||
$object->state_id = $_POST["state_id"];
|
||||
$object->email = $_POST["email"];
|
||||
$object->phone_pro = $_POST["phone_pro"];
|
||||
$object->phone_perso = $_POST["phone_perso"];
|
||||
@ -239,7 +239,7 @@ if (empty($reshook))
|
||||
$object->address = $_POST["address"];
|
||||
$object->zip = $_POST["zipcode"];
|
||||
$object->town = $_POST["town"];
|
||||
$object->state_id = $_POST["departement_id"];
|
||||
$object->state_id = $_POST["state_id"];
|
||||
$object->country_id = $_POST["country_id"];
|
||||
|
||||
$object->email = $_POST["email"];
|
||||
@ -889,7 +889,7 @@ else
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($img) print $img.' ';
|
||||
print $object->country_id;
|
||||
print $object->country;
|
||||
print '</td></tr>';
|
||||
|
||||
// State
|
||||
|
||||
@ -87,7 +87,7 @@ class box_contacts extends ModeleBoxes
|
||||
$datec=$db->jdate($objp->datec);
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
$contactstatic->name=$objp->name;
|
||||
$contactstatic->lastname=$objp->lastname;
|
||||
$contactstatic->firstname=$objp->firstname;
|
||||
$contactstatic->civilite_id=$objp->civilite;
|
||||
|
||||
|
||||
@ -622,7 +622,7 @@ class Translate
|
||||
$newdir=dol_osencode($dir);
|
||||
|
||||
// Check if directory exists
|
||||
if (! dol_is_dir($dir)) continue;
|
||||
if (! is_dir($newdir)) continue; // We must not use dol_is_dir here, function may not be loaded
|
||||
|
||||
$fonc='numberwords';
|
||||
if (file_exists($newdir.'/functions_'.$fonc.'.lib.php'))
|
||||
|
||||
@ -871,7 +871,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tvakey=str_replace('*','',$tvakey);
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
|
||||
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -301,6 +301,8 @@ TotalHT=Total (net of tax)
|
||||
TotalTTC=Total (inc. tax)
|
||||
TotalTTCToYourCredit=Total (inc. tax) to your credit
|
||||
TotalVAT=Total tax
|
||||
TotalLT1=Total tax 2
|
||||
TotalLT2=Total tax 3
|
||||
TotalLT1ES=Total RE
|
||||
TotalLT2ES=Total IRPF
|
||||
IncludedVAT=Included tax
|
||||
|
||||
@ -303,6 +303,8 @@ TotalHT=Total HT
|
||||
TotalTTC=Total TTC
|
||||
TotalTTCToYourCredit=Total TTC à votre crédit
|
||||
TotalVAT=Total TVA
|
||||
TotalLT1=Total Taxe 2
|
||||
TotalLT2=Total Taxe 3
|
||||
TotalLT1ES=Total RE
|
||||
TotalLT2ES=Total IRPF
|
||||
IncludedVAT=Dont TVA
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||
*
|
||||
* 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
|
||||
@ -182,7 +182,7 @@ if ($action == 'add')
|
||||
$error+=1;
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv('Nature'))."<br>\n";
|
||||
}
|
||||
if (empty($_POST["nom"]))
|
||||
if (empty($_POST["lastname"]))
|
||||
{
|
||||
$error+=1;
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Lastname"))."<br>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user