Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Regis Houssin 2013-10-12 11:58:57 +02:00
commit 8daef9d99f
65 changed files with 951 additions and 1182 deletions

View File

@ -207,8 +207,11 @@ Note: If there was errors managed manually, you may need to make a git commit bu
> sbuild ...
> dput ...
* Go into page. You should see new package into unstable.
http://packages.qa.debian.org/t/tcpdf.html
* Package arrives into FTPmaster taskboard with status NEW (pending upload). You can view it at:
http://ftp-master.debian.org/new/
* Once package is validated, you should see it into area unstable at:
http://packages.qa.debian.org
* Package will be into release when test will be moved as stable.

View File

@ -0,0 +1 @@
http://en.wikipedia.org/wiki/VAT_identification_number

View File

@ -273,6 +273,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
$object->pass = trim($_POST["pass"]);
$object->societe = trim($_POST["societe"]);
$object->company = trim($_POST["societe"]);
$object->address = trim($_POST["address"]);
$object->zip = trim($_POST["zipcode"]);
$object->town = trim($_POST["town"]);

View File

@ -296,9 +296,6 @@ if ($result)
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
print '</td>';
print '<td class="liste_titre"><input class="flat" type="text" size="16" name="search_town" value="'.$search_town.'"></td>';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
print '</td>';
print '<td class="liste_titre" colspan="1" align="center">';
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
print '&nbsp;'.$langs->trans('Year').': ';

View File

@ -42,7 +42,7 @@ $debit=GETPOST("debit");
$credit=GETPOST("credit");
$type=GETPOST("type");
$account=GETPOST("account");
$bid=GETPOST("bid");
$bid=GETPOST("bid","int");
$param='';
if ($description) $param.='&description='.$description;
@ -83,7 +83,7 @@ $sql.= " b.fk_account, b.fk_type,";
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
$sql.= " bu.label as labelurl, bu.url_id";
$sql.= " FROM ";
if (! empty($_REQUEST["bid"])) $sql.= MAIN_DB_PREFIX."bank_class as l,";
if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,";
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba,";
$sql.= " ".MAIN_DB_PREFIX."bank as b";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'";
@ -92,21 +92,21 @@ $sql.= " WHERE b.fk_account = ba.rowid";
$sql.= " AND ba.entity = ".$conf->entity;
if (GETPOST("req_nb"))
{
$sql.= " AND b.num_chq like '%".$db->escape(GETPOST("req_nb"))."%'";
$sql.= " AND b.num_chq LIKE '%".$db->escape(GETPOST("req_nb"))."%'";
$param.='&amp;req_nb='.urlencode(GETPOST("req_nb"));
}
if (GETPOST("thirdparty"))
{
$sql.=" AND (COALESCE(s.nom,'') LIKE '%".$db->escape(GETPOST("thirdparty"))."%')";
$sql.=" AND s.nom LIKE '%".$db->escape(GETPOST("thirdparty"))."%'";
$param.='&amp;thirdparty='.urlencode(GETPOST("thirdparty"));
}
if (! empty($_REQUEST["bid"]))
if ($bid)
{
$sql.= " AND b.rowid=l.lineid AND l.fk_categ=".$_REQUEST["bid"];
$sql.= " AND b.rowid=l.lineid AND l.fk_categ=".$bid;
}
if(! empty($type))
if (! empty($type))
{
$sql .= " AND b.fk_type = '" . $type ."' ";
$sql.= " AND b.fk_type = '".$db->escape($type)."' ";
}
// Search criteria amount
$si=0;

View File

@ -116,7 +116,8 @@ $total_ttc=0;
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesResultDue");
@ -127,7 +128,8 @@ if ($modecompta=="CREANCES-DETTES")
}
else {
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
@ -135,7 +137,7 @@ else {
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta));
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
// Show report array
print '<table class="noborder" width="100%">';

View File

@ -63,7 +63,8 @@ $exportlink='';
if ($modecompta == 'CREANCES-DETTES')
{
$nom=$langs->trans("AnnualSummaryDueDebtMode");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period="$year_start - $year_end";
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesAmountWithTaxIncluded");
@ -75,7 +76,8 @@ if ($modecompta == 'CREANCES-DETTES')
}
else {
$nom=$langs->trans("AnnualSummaryInputOutputMode");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
$period="$year_start - $year_end";
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesAmountWithTaxIncluded");
@ -83,7 +85,7 @@ else {
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta));
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
/*

View File

@ -142,7 +142,8 @@ $formother = new FormOther($db);
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices");
if ($modecompta=="CREANCES-DETTES") {
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
@ -155,7 +156,8 @@ if ($modecompta=="CREANCES-DETTES") {
$builddate=time();
} else {
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
@ -165,7 +167,7 @@ if ($modecompta=="CREANCES-DETTES") {
$builddate=time();
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
// SQL request
@ -382,8 +384,7 @@ if ($modecompta == 'CREANCES-DETTES') {
print '</form>';
} else {
// $modecompta != 'CREANCES-DETTES'
// TODO: better message
print '<div class="warning">' . $langs->trans("WarningNotRelevant") . '</div>';
print '<br>'.$langs->trans("TurnoverPerProductInCommitmentAccountingNotRelevant") . '<br>';
}
llxFooter();

View File

@ -137,7 +137,8 @@ $form=new Form($db);
// Show report header
if ($modecompta=="CREANCES-DETTES") {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCADue");
@ -147,7 +148,8 @@ if ($modecompta=="CREANCES-DETTES") {
//$exportlink=$langs->trans("NotYetAvailable");
} else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCAIn");
@ -158,7 +160,7 @@ if ($modecompta=="CREANCES-DETTES") {
$moreparam=array();
if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
// Show array

View File

@ -151,7 +151,8 @@ $formother = new FormOther($db);
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCADue");
@ -161,7 +162,8 @@ if ($modecompta=="CREANCES-DETTES")
//$exportlink=$langs->trans("NotYetAvailable");
} else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCAIn");
@ -170,7 +172,7 @@ if ($modecompta=="CREANCES-DETTES")
//$exportlink=$langs->trans("NotYetAvailable");
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
// Show Array
@ -227,7 +229,7 @@ $sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY s.rowid, s.nom";
$sql.= " ORDER BY s.rowid";
echo $sql;
//echo $sql;
$result = $db->query($sql);
if ($result) {

View File

@ -60,7 +60,8 @@ $form=new Form($db);
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("SalesTurnover");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period="$year_start - $year_end";
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesCADue");
@ -71,7 +72,8 @@ if ($modecompta=="CREANCES-DETTES")
}
else {
$nom=$langs->trans("SalesTurnover");
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
$period="$year_start - $year_end";
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesCAIn");
@ -81,7 +83,7 @@ else {
}
$moreparam=array();
if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
if ($modecompta == 'CREANCES-DETTES')

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Yannick Warnier <ywarnier@beeznest.org>
*
* This program is free software; you can redistribute it and/or modify
@ -110,6 +110,8 @@ $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans("VATReportByCustomersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
@ -121,7 +123,6 @@ if ($modetax==1) // Calculate on invoice for goods and services
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
else $description.='<br>'.$langs->trans("DepositsAreIncluded");
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
@ -137,6 +138,8 @@ if ($modetax==1) // Calculate on invoice for goods and services
if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByCustomersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
@ -149,7 +152,6 @@ if ($modetax==0) // Invoice for goods, payment for services
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
@ -162,7 +164,7 @@ if ($modetax==0) // Invoice for goods, payment for services
$amountsup=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
$vatcust=$langs->trans("VATReceived");
$vatsup=$langs->trans("VATPaid");

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2007 Yannick Warnier <ywarnier@beeznest.org>
*
* This program is free software; you can redistribute it and/or modify
@ -121,10 +121,13 @@ $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
//$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
//$fsearch.=' <input type="text" name="min" value="'.$min.'">';
// Affiche en-tete du rapport
if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
@ -140,7 +143,6 @@ if ($modetax==1) // Calculate on invoice for goods and services
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
else $description.='<br>'.$langs->trans("DepositsAreIncluded");
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$description.=$fsearch;
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
@ -159,6 +161,8 @@ if ($modetax==1) // Calculate on invoice for goods and services
if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
@ -176,7 +180,6 @@ if ($modetax==0) // Invoice for goods, payment for services
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
@ -191,7 +194,7 @@ if ($modetax==0) // Invoice for goods, payment for services
$vatsup=$langs->trans("VATPaid");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
$vatcust=$langs->trans("VATReceived");
$vatsup=$langs->trans("VATPaid");

View File

@ -106,11 +106,12 @@ class Translate
// Array force long code from first part, even if long code is defined
$longforshort=array('ar'=>'ar_SA');
if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])];
else {
else if (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser
$srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]);
$longforlong=array('no_nb'=>'nb_NO');
if (isset($longforlong[strtolower($srclang)])) $srclang=$longforlong[strtolower($srclang)];
}
else $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]);
}
else { // If it's for a codetouse that is a short code xx
// Array to convert short lang code into long code.
@ -784,6 +785,16 @@ class Translate
return -1;
}
}
function get_translations_for_substitutions() {
$substitutionarray = array();
foreach($this->tab_translate as $code => $label) {
$substitutionarray['lang_'.$code] = $label;
}
return $substitutionarray;
}
}
?>

View File

@ -34,9 +34,10 @@
* @param date $builddate Date generation
* @param string $exportlink Link for export or ''
* @param array $moreparam Array with list of params to add into form
* @param string $calcmode Calculation mode
* @return void
*/
function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array())
function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='')
{
global $langs, $hselected;
@ -59,13 +60,26 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
// Ligne de titre
print '<tr>';
print '<td valign="top" width="110">'.$langs->trans("ReportName").'</td>';
if (! $variante) print '<td colspan="3">';
if (! $variantexxx) print '<td colspan="3">';
else print '<td>';
print $nom;
if ($variante) print '</td><td colspan="2">'.$variante;
if ($variantexxx) print '</td><td colspan="2">'.$variantexxx;
print '</td>';
print '</tr>';
// Calculation mode
if ($calcmode)
{
print '<tr>';
print '<td valign="top" width="110">'.$langs->trans("CalculationMode").'</td>';
if (! $variante) print '<td colspan="3">';
else print '<td>';
print $calcmode;
if ($variante) print '</td><td colspan="2">'.$variante;
print '</td>';
print '</tr>';
}
// Ligne de la periode d'analyse du rapport
print '<tr>';
print '<td>'.$langs->trans("ReportPeriod").'</td>';

View File

@ -102,6 +102,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/liste.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3103__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/valo.php', 'EnhancedValue', 1, 'stocks', '$user->rights->stock->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__);
-- Product - Categories
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3200__+MAX_llx_menu__, 'products', 'cat', 3__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&amp;type=0', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3201__+MAX_llx_menu__, 'products', '', 3200__+MAX_llx_menu__, '/categories/fiche.php?action=create&amp;type=0', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);

View File

@ -1007,7 +1007,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/liste.php", $langs->trans("List"), 1, $user->rights->stock->lire);
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/valo.php", $langs->trans("EnhancedValue"), 1, $user->rights->stock->lire);
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire);
if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
}
// Expeditions

View File

@ -74,7 +74,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
@ -534,6 +534,18 @@ class doc_generic_order_odt extends ModelePDFCommandes
dol_syslog($this->error, LOG_WARNING);
return -1;
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -74,7 +74,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
@ -534,6 +534,18 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
dol_syslog($this->error, LOG_WARNING);
return -1;
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -74,7 +74,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
@ -514,6 +514,18 @@ class doc_generic_invoice_odt extends ModelePDFFactures
dol_syslog($this->error, LOG_WARNING);
return -1;
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -90,7 +90,7 @@ class doc_generic_project_odt extends ModelePDFProjects
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
@ -976,6 +976,18 @@ class doc_generic_project_odt extends ModelePDFProjects
dol_syslog($this->error, LOG_WARNING);
return -1;
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -74,7 +74,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
@ -487,6 +487,18 @@ class doc_generic_proposal_odt extends ModelePDFPropales
dol_syslog($this->error, LOG_WARNING);
return -1;
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -318,6 +318,18 @@ class doc_generic_odt extends ModeleThirdPartyDoc
// setVars failed, probably because key not found
}
}
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
{
try {
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
catch(OdfException $e)
{
}
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);

View File

@ -898,7 +898,7 @@ if ($action == 'create')
}
}
}
else
else if ($id || $ref)
/* *************************************************************************** */
/* */
/* Edit and view mode */

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Professional ID 6
ProfId1AR=Проф. Id едно (CUIT / Cuil)
ProfId1AR=Проф. Id едно (CUIL)
ProfId2AR=Проф. Id 2 (Revenu зверове)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professionel ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu Bestier)
ProfId3AR=-
ProfId4AR=-

View File

@ -301,7 +301,7 @@ ProfId1NL=KVK nummer
ProfId2NL=-
ProfId3NL=-
ProfId4NL=-
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu Bestien)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu Bestien)
ProfId3AR=-
ProfId4AR=-

View File

@ -10,36 +10,36 @@ VersionDevelopment=Υπό ανάπτυξη
VersionUnknown=Άγνωστη
VersionRecommanded=Προτεινόμενη
SessionId=ID Συνόδου
SessionSaveHandler=Φορέα εξυπηρέτησης για να σώσει συνεδρίες
SessionSaveHandler=Φορέας χειρισμού αποθήκευσης συνεδριών
SessionSavePath=Αποθήκευση τοπικής προσαρμογής συνεδρίας
PurgeSessions=Διαγραφή συνόδων
ConfirmPurgeSessions=Είστε σίγουροι ότι θέλετε να εκκαθαρίσετε όλες τις συνεδρίες; Αυτό θα αποσυνδέσει όλους τους χρήστες (εκτός από τον εαυτό σας).
NoSessionListWithThisHandler=Save session handler configured in your PHP does not allow to list all running sessions.
LockNewSessions=Κλειδώσετε τις νέες συνδέσεις
ConfirmLockNewSessions=Είστε σίγουροι ότι θέλετε να περιορίσει κάθε νέα σύνδεση Dolibarr για τον εαυτό σας. Μόνο ο χρήστης <b>%s</b> θα είναι σε θέση να συνδεθεί μετά από αυτό.
NoSessionListWithThisHandler=Ο Φορέας χειρισμού αποθήκευσης συνεδριών που έχει διαμορφωθεί στο PHP σας δεν επιτρέπει καταχώρηση όλων των τρέχοντων συνεδριών.
LockNewSessions=Κλειδώστε τις νέες συνδέσεις
ConfirmLockNewSessions=Είστε σίγουροι ότι θέλετε να περιορίσετε κάθε νέα σύνδεση Dolibarr για τον εαυτό σας. Μόνο ο χρήστης <b>%s</b> θα είναι σε θέση να συνδεθεί μετά από αυτό.
UnlockNewSessions=Κατάργηση κλειδώματος σύνδεσης
YourSession=Η σύνοδος σας
Sessions=Σύνοδοι χρηστών
WebUserGroup=Διακομιστή Web χρήστη / ομάδα
NoSessionFound=Your PHP seems to not allow to list active sessions. Directory used to save sessions (<b>%s</b>) might be protected (For example, by OS permissions or by PHP directive open_basedir).
HTMLCharset=Σετ χαρακτήρων που δημιουργούνται για HTML σελίδες
WebUserGroup=Χειριστής/Ομάδα Διακομιστή Web
NoSessionFound=Το PHP σας δεν επιτρέπει την καταγραφή όλων των ενεργοποιημένων συνεδριών. Ο κατάλογος που χρησιμοποιείται για να αποθηκεύετε συνεδρίες (<b>%s</b>) πιθανόν προστατεύεται (Για παράδειγμα, από OS άδειες ή από οδηγίες PHP open_basedir).
HTMLCharset=Σετ χαρακτήρων για δημιουργημένες HTML σελίδες
DBStoringCharset=Σύνολο χαρακτήρων βάσης δεδομένων για την αποθήκευση δεδομένων
DBSortingCharset=Σύνολο χαρακτήρων βάσης δεδομένων για να ταξινομήσετε τα δεδομένα
DBSortingCharset=Σετ χαρακτήρων βάσης δεδομένων για ταξινόμηση δεδομένων
WarningModuleNotActive=Το άρθρωμα <b>%s</b> πρέπει να ενεργοποιηθεί
WarningOnlyPermissionOfActivatedModules=Τα μόνο δικαιώματα που σχετίζονται με ενεργοποιημένες ενότητες που παρουσιάζονται εδώ. Μπορείτε να ενεργοποιήσετε άλλες ενότητες στο Αρχική-> Ρυθμίσεις-> σελίδα Αρθρώματα.
WarningOnlyPermissionOfActivatedModules=Εδώ φαίνονται μόνο τα δικαιώματα που σχετίζονται με ενεργοποιημένες ενότητες. Μπορείτε να ενεργοποιήσετε άλλες ενότητες στο Αρχική-> Ρυθμίσεις-> σελίδα Αρθρώματα.
DolibarrSetup=Εγκατάσταση ή αναβάθμιση του Dolibarr
DolibarrUser=Χρήστης Dolibarr
InternalUser=Εσωτερικός χρήστης
ExternalUser=Εξωτερικός χρήστης
InternalUsers=Εσωτερικοί χρήστες
ExternalUsers=Εξωτερικοί χρήστες
GlobalSetup=Καθολική Διαχείριση
GlobalSetup=Σφαιρική Διαχείριση
GUISetup=Εμφάνιση
SetupArea=Περιοχή Παραμετροποίησης
FormToTestFileUploadForm=Form to test file upload (according to setup)
FormToTestFileUploadForm=Έντυπο για να ελέγξετε το αρχείο μεταφόρτωσης (ανάλογα με τις ρυθμίσεις)
IfModuleEnabled=Σημείωση: ναι, είναι αποτελεσματική μόνο αν η ενότητα <b>%s</b> είναι ενεργοποιημένη
RemoveLock=Αφαίρεση αρχείου <b>%s</b> αν υπάρχει για να επιτρέψει τη χρήση του εργαλείου ενημέρωσης.
RestoreLock=Επαναφορά αρχείου <b>%s</b>, με δικαίωμα ανάγνωσης μόνο, για να απενεργοποιήσετε οποιαδήποτε χρήση του εργαλείου ενημέρωσης.
RemoveLock=Αφαίρεστε το αρχείο <b>%s</b>, αν υπάρχει, για να επιτραπεί η χρήση του εργαλείου ενημέρωσης.
RestoreLock=Επαναφέρατε το αρχείο <b>%s</b>, με δικαίωμα ανάγνωσης μόνο, για να απενεργοποιηθεί οποιαδήποτε χρήση του εργαλείου ενημέρωσης.
SecuritySetup=Διαχείριση Ασφάλειας
ErrorModuleRequirePHPVersion=Λάθος, αυτή η ενότητα απαιτεί έκδοση PHP %s ή υψηλότερη
ErrorModuleRequireDolibarrVersion=Λάθος, αυτή η ενότητα απαιτεί Dolibarr έκδοση %s ή υψηλότερη
@ -52,58 +52,58 @@ DisableJavascript=Απενεργοποίηση συναρτήσεων JavaScript
ConfirmAjax=Χρήση διαλόγων επιβεβαίωσης Ajax
UseSearchToSelectCompany=Χρήση φόρμας αναζήτησης για επιλογή εταιρίας (αντί χρήσης πλαισίων λίστας). Αν έχετε μεγάλο αριθμό στοιχείων (>100000) μπορείτε να αυξήσετε την ταχύτητα θέτοντας την μεταβλητή SOCIETE_DONOTSEARCH_ANYWHERE σε 1 στο μενού Ρυθμίσεις -> Άλλες Ρυθμίσεις
ActivityStateToSelectCompany= Προσθέστε μια επιλογή φίλτρου για εμφάνιση / απόκρυψη τρίτα μέρη τα οποία βρίσκονται σε λειτουργία ή έχει παύσει
UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).<br><br>Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
UseSearchToSelectContact=Χρησιμοποιήστε τα πεδία αυτόματης συμπλήρωσης για να επιλέξετε επαφή (αντί να χρησιμοποιήσετε ένα πλαίσιο λίστας).<br><br>Επίσης, αν έχετε ένα μεγάλο αριθμό τρίτων (> 100 000), μπορείτε να αυξήσετε την ταχύτητα με τη σταθερή CONTACT_DONOTSEARCH_ANYWHERE στο 1 στην Εγκατάσταση->Άλλα. Η αναζήτηση μετά θα περιορίζεται απο την έναρξη της συμβολοσειράς.
SearchFilter=Αναζήτηση επιλογές φίλτρων
NumberOfKeyToSearch=Πλήθος χαρακτήρων για να ξεκινήσει η αναζήτηση: %s
ViewFullDateActions=Show full dates actions in the third sheet
ViewFullDateActions=Εμφάνιση πλήρους χρονοδιαγράματος γεγονότων στο τρίτο φύλλο
NotAvailableWhenAjaxDisabled=Δεν είναι διαθέσιμο όταν το Ajax είναι απενεργοποιημένο
JavascriptDisabled=Η JavaScript είναι απενεργοποιημένη
UsePopupCalendar=Χρήση popup για είσοδο ημερομηνιών
UsePreviewTabs=Χρήση καρτελών προεπισκόπησης
ShowPreview=Εμφάνιση προεπισκόπησης
PreviewNotAvailable=Η προεπισκόπηση δεν είναι διαθέσιμη
ThemeCurrentlyActive=Ενεργή θεματική παραλλαγή
ThemeCurrentlyActive=Θεματική Επι του Παρόντος Ενεργή
CurrentTimeZone=TimeZone PHP (server)
Space=Κενό
Table=Πίνακας
Fields=Πεδία
Index=Index
Index=Ευρετήριο
Mask=Μάσκα
NextValue=Επόμενο
NextValueForInvoices=Επόμενο (τιμολόγιο)
NextValueForCreditNotes=Επόμενη αξία (πιστωτικά σημειώματα)
MustBeLowerThanPHPLimit=Note: your PHP limits each file upload's size to <b>%s</b> %s, whatever this parameter's value is
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
MustBeLowerThanPHPLimit=Σημείωση: Η PHP σας περιορίζει το μέγεθος κάθε αρχείου αποστολής σε <b>% s </ b>%s, ανεξάρτητα από το ποιά είναι η αξία αυτής της παραμέτρου.
NoMaxSizeByPHPLimit=Σημείωση: Κανένα όριο δεν έχει οριστεί στη διαμόρφωση του PHP σας
MaxSizeForUploadedFiles=Μέγιστο μέγεθος για μεταφόρτωση αρχείων (0 απορρίπτει οποιοδήποτε upload)
UseCaptchaCode=Use graphical code (CAPTCHA) on login page
UseCaptchaCode=Χρησιμοποιήστε το γραφικό κώδικα (CAPTCHA) στη σελίδα εισόδου
UseAvToScanUploadedFiles=Χρήση αντιβιοτικού για έλεγχο των αρχείων που θα μεταφορτωθούν στο διακομιστή
AntiVirusCommand= Πλήρης διαδρομή για το εκτελέσιμο αρχείο του αντιβιοτικού
AntiVirusCommand= Πλήρης διαδρομή για εντολή αντιβιοτικού
AntiVirusCommandExample= Παράδειγμα για ClamWin: c:\\Program Files (x86)\\ClamWin\\bin\\clamscan.exe<br>Παράδειγμα για ClamAv: /usr/bin/clamscan
AntiVirusParam= Περισσότερες παράμετροι στην γραμμή εντολής
AntiVirusParamExample= Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib"
ComptaSetup=Accounting module setup
AntiVirusParamExample= Παράδειγμα για το ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib"
ComptaSetup=Εγκατάσταση Λογιστικής Ενότητας
UserSetup=Ρύθμιση χρήστη
MenuSetup=Ρύθμιση Menu
MenuLimits=Όρια και ακρίβεια
MenuIdParent=Parent menu ID
DetailMenuIdParent=ID of parent menu (empty for a top menu)
DetailPosition=Αριθμός Ταξινόμηση για να καθορίσει τη θέση του μενού
PersonalizedMenusNotSupported=Εξατομικευμένα μενού που δεν υποστηρίζονται
MenuIdParent=ID Μητρικού Μενού
DetailMenuIdParent=ID του μητρικού μενού (άδειο για μενού κορυφής)
DetailPosition=Αριθμός Ταξινόμησης για να καθορίστει η θέση του μενού
PersonalizedMenusNotSupported=Εξατομικευμένα μενού δεν υποστηρίζονται
AllMenus=Όλα
NotConfigured=Δεν έχει καθοριστεί
NotConfigured=Η ενότητα δεν έχει ρυθμιστεί
Setup=Διαχείριση
Activation=Ενεργοποίηση
Active=Active
Active=Ενεργό
SetupShort=Διαχείριση
OtherOptions=Άλλες Επιλογές
OtherSetup=Άλλες Ρυθμίσεις
CurrentValueSeparatorDecimal=Decimal separator
CurrentValueSeparatorThousand=Thousand separator
Modules=Αρθρώματα
ModulesCommon=Βασικά Αρθρώματα
ModulesOther=Άλλα Αρθρώματα
ModulesInterfaces=Αρθρώματα Διεπαφής
ModulesSpecial=Modules very specific
CurrentValueSeparatorDecimal=Διαχωριστικό Δεκαδικών
CurrentValueSeparatorThousand=Διαχωριστικό Χιλιάδων
Modules=Ενότητες
ModulesCommon=Βασικές Ενότητες
ModulesOther=Άλλες Ενότητες
ModulesInterfaces=Ενότητες Διεπαφής
ModulesSpecial=Ειδικές Ενότητες
ParameterInDolibarr=Παράμετρος %s
LanguageParameter=Παράμετρος γλώσσας %s
LanguageBrowserParameter=Παράμετρος %s
@ -118,7 +118,7 @@ DaylingSavingTime=Η θερινή ώρα (χρήστη)
CurrentHour=PHP server hour
CompanyTZ=Time Zone company (main company)
CompanyHour=Hour company (main company)
CurrentSessionTimeOut=Current session timeout
CurrentSessionTimeOut=Χρονικό όριο περιόδου λειτουργίας τρεχούσης συνοδού
YouCanEditPHPTZ=Για να ορίσετε μια διαφορετική ζώνη ώρας της PHP (δεν απαιτείται), μπορείτε να δοκιμάσετε να προσθέσετε ένα αρχείο .htacces με μια γραμμή σαν αυτό "TZ setenv Europe / Paris"
OSEnv=Περιβάλλον OS
Box=Πλαίσιο
@ -126,8 +126,8 @@ Boxes=Πλαίσια
MaxNbOfLinesForBoxes=Μέγιστο πλήθος γραμμών για τα πλαίσια πληροφοριών
PositionByDefault=Προκαθορισμένη σειρά
Position=Σειρά
MenusDesc=Μενού διαχειριστές καθορίζουν το περιεχόμενο των 2 μπαρ μενού (οριζόντια γραμμή και κάθετη γραμμή).
MenusEditorDesc=The menu editor allow you to define personalized entries in menus. Use it carefully to avoid making dolibarr unstable and menu entries permanently unreachable.<br>Some modules add entries in the menus (in menu <b>All</b> in most cases). If you removed some of these entries by mistake, you can restore them by disabling and reenabling the module.
MenusDesc=Οι διαχειριστές μενού καθορίζουν το περιεχόμενο των 2 μπαρ μενού (οριζόντια γραμμή και κάθετη γραμμή).
MenusEditorDesc=Ο επεξεργαστής μενού σας επιτρέπει να ορίσετε προσωπικές καταχωρήσεις στα μενού. Χρησιμοποιήστε το με προσοχή για να αποφύγετε να κάνετε το dolibarr ασταθές και τις καταχωρήσεις μενού μόνιμα απρόσιτες.<br>Μερικές μονάδες προσθέτουν καταχωρήσεις στα μενού (στο μενού <b> All </ b> στις περισσότερες περιπτώσεις). Εάν αφαιρεθεί κάποια από αυτές τις καταχωρήσεις κατά λάθος, μπορείτε να τα επαναφέρετε με την απενεργοποίηση και εκ νέου ενεργοποίηση της μονάδας.
MenuForUsers=Μενού για τους χρήστες
LangFile=Αρχείο .lang
System=Σύστημα
@ -136,10 +136,10 @@ SystemTools=Εργαλεία Συστήματος
SystemToolsArea=Περιοχή Εργαλειών Συστήματος
SystemToolsAreaDesc=Αυτή η περιοχή παρέχει δυνατότητες διαχείρισης. Χρησιμοποιήστε το μενού για να επιλέξετε τη λειτουργία που ψάχνετε.
Purge=Εκκαθάριση
PurgeAreaDesc=This page allows you to delete all files built or stored by Dolibarr (temporary files or all files in <b>%s</b> directory). Using this feature is not necessary. It is provided for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files built by the web server.
PurgeDeleteLogFile=Delete log file <b>%s</b> defined for Syslog module (no risk to loose data)
PurgeAreaDesc=Αυτή η σελίδα σας επιτρέπει να διαγράψετε όλα τα αρχεία που κατασκευάζονται ή αποθηκεύονται από Dolibarr (προσωρινά αρχεία ή όλα τα αρχεία σε <b>% s </ b> directory). Η χρήση αυτής της λειτουργίας δεν είναι απαραίτητη. Παρέχεται για χρήστες των οποίων το Dolibarr φιλοξενείται από πάροχο, που δεν προσφέρει δικαιώμα διαγραφής αρχείων που κατασκευάστηκαν από τον web server.
PurgeDeleteLogFile=Διαγραφή αρχείου καταγραφής <b>% s </ b> που ορίζεται για τη μονάδα syslog (δεν υπάρχει κίνδυνος απώλειας δεδομένων)
PurgeDeleteTemporaryFiles=Διαγραφή όλων των προσωρινών αρχείων (ΔΕΝ υπάρχει κίνδυνος απώλειας δεδομένων)
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory <b>%s</b>. Temporary files but also database backup dumps, files attached to elements (third parties, invoices, ...) and uploaded into the ECM module will be deleted.
PurgeDeleteAllFilesInDocumentsDir=Διαγραφή όλων των αρχείων στον κατάλογο <b>% s</ b>. Προσωρινά αρχεία αλλά και βάση δεδομένων αντιγράφων ασφαλείας κάδου απορριμάτων, αρχεία που συνδέονται με τα στοιχεία (τρίτοι, τιμολόγια, ...) και μεταφορτώνονται στη μονάδα ECM θα διαγραφούν.
PurgeRunNow=Διαγραφή τώρα
PurgeNothingToDelete=Δεν υπάρχει κατάλογος ή αρχείο για διαγραφή.
PurgeNDirectoriesDeleted=<b>%s</b> αρχεία ή κατάλογοι που διαγραφήκαν.
@ -148,46 +148,46 @@ ConfirmPurgeAuditEvents=Είστε σίγουροι ότι θέλετε να δ
NewBackup=Νέο αντίγραφο ασφαλείας
GenerateBackup=Δημιουργία αντιγράφου ασφαλείας
Backup=Αντίγραφα Ασφαλείας
Restore=Επαναφορά Αντιγράφων
Restore=Επαναφορά
RunCommandSummary=Το Backup έχει ξεκινήσει με την ακόλουθη εντολή
RunCommandSummaryToLaunch=Backup μπορεί να ξεκινήσει με την ακόλουθη εντολή
WebServerMustHavePermissionForCommand=Ο web server σας πρέπει να έχει την άδεια για να τρέξει αυτές τις εντολές
BackupResult=Αποτέλεσμα αντιγράφων ασφαλείας
BackupFileSuccessfullyCreated=Δημιουργία αντιγράφων ασφαλείας το αρχείο ολοκληρώθηκε με επιτυχία
YouCanDownloadBackupFile=Τα αρχεία μπορείτε τώρα να τα κατεβάσετε
NoBackupFileAvailable=Δεν υπάρχουν αρχεία αντιγράφων ασφαλείας.
BackupFileSuccessfullyCreated=Το Αρχείο δημιουργίας αντιγράφων ασφαλείας δημιουργήθηκε με επιτυχία
YouCanDownloadBackupFile=Τα παραγόμενα αρχεία μπορούν τώρα να κατέβουν.
NoBackupFileAvailable=Δεν υπάρχουν διαθέσιμα αρχεία αντιγράφων ασφαλείας.
ExportMethod=Μέθοδος Εξαγωγής
ImportMethod=Μέθοδος Εισαγωγής
ToBuildBackupFileClickHere=To build a backup file, click <a href="%s">here</a>.
ToBuildBackupFileClickHere=Για να δημιουργήσετε ένα αρχείο αντιγράφων ασφαλείας, κάντε κλίκ <a href="%s">εδώ</a>.
ImportMySqlDesc=Για να εισαγάγετε ένα αρχείο αντιγράφου ασφαλείας, θα πρέπει να χρησιμοποιήσετε mysql εντολή από την γραμμή εντολών:
ImportPostgreSqlDesc=Για την εισαγωγή ενός αντιγράφου ασφαλείας, πρέπει να χρησιμοποιήσετε pg_restore εντολή από την γραμμή εντολών:
ImportMySqlCommand=%s %s < mybackupfile.sql
ImportPostgreSqlCommand=%s %s mybackupfile.sql
FileNameToGenerate=Όνομα αρχείου προς δημιουργία
Compression=Συμπίεση
CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import
CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later
ExportCompatibility=Compatibility of generated export file
MySqlExportParameters=MySQL export parameters
PostgreSqlExportParameters= PostgreSQL export parameters
UseTransactionnalMode=Use transactional mode
FullPathToMysqldumpCommand=Full path to mysqldump command
CommandsToDisableForeignKeysForImport=Εντολή απενεργοποίησης ξένων πλήκτρων κάτα την εισαγωγή
CommandsToDisableForeignKeysForImportWarning=Αναγκαίο, εαν θέλετε να έχετε αργότερα την δυνατότητα αποκαταστασης του sql dump σας
ExportCompatibility=Συμβατότητα των παραχθέντων αρχείων εξαγωγής
MySqlExportParameters=MySQL Παραμετροι Εξαγωγών
PostgreSqlExportParameters= PostgreSQL Παράμετροι Εξαγωγών
UseTransactionnalMode=Χρήση Συναλλακτικής Λειτουργίας
FullPathToMysqldumpCommand=Πλήρης διαδρομή προς την εντολ mysqldump
FullPathToPostgreSQLdumpCommand=Η πλήρης διαδρομή προς pg_dump εντολή
ExportOptions=Επιλογές Εξαγωγής
AddDropDatabase=Add DROP DATABASE command
AddDropTable=Add DROP TABLE command
ExportStructure=Structure
AddDropDatabase=Προσθήκη εντολής DROP DATABASE
AddDropTable=Προσθήκη εντολής DROP TABLE
ExportStructure=Δομή
Datas=Δεδομένα
NameColumn=Όνοματα Στηλών
ExtendedInsert=Extended INSERT
NoLockBeforeInsert=Δεν εντολές κλειδαριά ασφαλείας γύρω από INSERT
DelayedInsert=Delayed insert
EncodeBinariesInHexa=Encode binary data in hexadecimal
IgnoreDuplicateRecords=Ignore errors of duplicate records (INSERT IGNORE)
ExtendedInsert=Εκτεταμένη INSERT
NoLockBeforeInsert=Δεν υπάρχουν εντολές κλειδώματος ασφαλείας γύρω από INSERT
DelayedInsert=Καθυστέρηση ένθετου
EncodeBinariesInHexa=Κωδικοποίηση δυαδικών δεδομένων σε δεκαεξαδική
IgnoreDuplicateRecords=Αγνοήστε τα λάθη των διπλών εγγραφών (Insert IGNORE)
Yes=Ναι
No=Όχι
AutoDetectLang=Αυτόματη Ανίχνευση (γλώσσα φυλλομετρητή)
FeatureDisabledInDemo=Feature disabled in demo
FeatureDisabledInDemo=Δυνατότητα απενεργοποίησης στο demo
Rights=Δικαιώματα
BoxesDesc=Boxes are screen area that show a piece of information on some pages. You can choose between showing the box or not by selecting target page and clicking 'Activate', or by clicking the dustbin to disable it.
OnlyActiveElementsAreShown=Only elements from <a href="%s">enabled modules</a> are shown.

View File

@ -3,9 +3,9 @@ CHARSET=UTF-8
Proposals=Εμπορικές προτάσεις
Proposal=Εμπορική πρόταση
ProposalShort=Πρόταση
ProposalsDraft=Draft commercial proposals
ProposalDraft=Draft commercial proposal
ProposalsOpened=Opened commercial proposals
# ProposalsDraft=Draft commercial proposals
# ProposalDraft=Draft commercial proposal
# ProposalsOpened=Opened commercial proposals
Prop=Εμπορικές προτάσεις
CommercialProposal=Εμπορική πρόταση
CommercialProposals=Εμπορικές προτάσεις
@ -18,35 +18,35 @@ ProspectList=Λίστα προοπτικών
DeleteProp=Διαγραφή εμπορικής πρότασης
ValidateProp=Επικύρωση εμπορικής πρότασης
AddProp=Προσθήκη πρότασης
ConfirmDeleteProp=Are you sure you want to delete this commercial proposal ?
ConfirmValidateProp=Are you sure you want to validate this commercial proposal ?
LastPropals=Last %s proposals
LastClosedProposals=Last %s closed proposals
# ConfirmDeleteProp=Are you sure you want to delete this commercial proposal ?
# ConfirmValidateProp=Are you sure you want to validate this commercial proposal under name <b>%s</b> ?
# LastPropals=Last %s proposals
# LastClosedProposals=Last %s closed proposals
LastModifiedProposals=%s τελευταίες εμπορικές προτάσεις
AllPropals=Όλες οι προτάσεις
LastProposals=Τελευταίες προτάσεις
SearchAProposal=Εύρεση πρότασης
ProposalsStatistics=Commercial proposal's statistics
NumberOfProposalsByMonth=Number by month
AmountOfProposalsByMonthHT=Amount by month (net of tax)
NbOfProposals=Number of commercial proposals
ShowPropal=Show proposal
PropalsDraft=Drafts
PropalsOpened=Opened
PropalsNotBilled=Closed not billed
PropalStatusDraft=Draft (needs validation)
PropalStatusValidated=Validated (proposal is open)
PropalStatusOpened=Validated (proposal is open)
PropalStatusClosed=Closed
PropalStatusSigned=Signed (needs billing)
PropalStatusNotSigned=Not signed (closed)
PropalStatusBilled=Billed
PropalStatusDraftShort=Draft
PropalStatusValidatedShort=Validated
PropalStatusOpenedShort=Opened
PropalStatusClosedShort=Closed
PropalStatusSignedShort=Signed
PropalStatusNotSignedShort=Not signed
# ProposalsStatistics=Commercial proposal's statistics
# NumberOfProposalsByMonth=Number by month
# AmountOfProposalsByMonthHT=Amount by month (net of tax)
# NbOfProposals=Number of commercial proposals
# ShowPropal=Show proposal
# PropalsDraft=Drafts
# PropalsOpened=Opened
# PropalsNotBilled=Closed not billed
# PropalStatusDraft=Draft (needs validation)
# PropalStatusValidated=Validated (proposal is open)
# PropalStatusOpened=Validated (proposal is open)
# PropalStatusClosed=Closed
# PropalStatusSigned=Signed (needs billing)
# PropalStatusNotSigned=Not signed (closed)
# PropalStatusBilled=Billed
# PropalStatusDraftShort=Draft
# PropalStatusValidatedShort=Validated
# PropalStatusOpenedShort=Opened
# PropalStatusClosedShort=Closed
# PropalStatusSignedShort=Signed
# PropalStatusNotSignedShort=Not signed
PropalStatusBilledShort=Χρεωμένη
PropalsToClose=Εμπορικές προτάσεις προς κλείσιμο
PropalsToBill=Υπογεγραμμένες εμπορικές προτάσεις προς χρέωση

View File

@ -4,7 +4,7 @@ Accountancy=Accountancy
AccountancyCard=Accountancy card
Treasury=Treasury
MenuFinancial=Financial
TaxModuleSetupToModifyRules=Go to <a href="%s">module setup</a> to modify rules for calculation
TaxModuleSetupToModifyRules=Go to <a href="%s">Taxes module setup</a> to modify rules for calculation
OptionMode=Option for accountancy
OptionModeTrue=Option Incomes-Expenses
OptionModeVirtual=Option Claims-Debts
@ -103,8 +103,12 @@ ConfirmPaySocialContribution=Are you sure you want to classify this social contr
DeleteSocialContribution=Delete a social contribution
ConfirmDeleteSocialContribution=Are you sure you want to delete this social contribution?
ExportDataset_tax_1=Social contributions and payments
AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary, mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>.
AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>.
CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>.
CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>.
CalcModeDebt=Mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>.
CalcModeEngagement=Mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>
AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary
AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary
AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by third parties, mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>.
AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by third parties, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>.
SeeReportInInputOutputMode=See report <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b> for a calculation on actual payments made
@ -117,13 +121,13 @@ RulesCAIn=- It includes all the effective payments of invoices received from cli
DepositsAreNotIncluded=- Deposit invoices are nor included
DepositsAreIncluded=- Deposit invoices are included
LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF
VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid (VAT receipt)
VATReportByCustomersInDueDebtMode=Report by the customer VAT collected and paid (VAT rate)
VATReportByQuartersInInputOutputMode=Report by rate of the VAT collected and paid (VAT receipt)
VATReportByQuartersInDueDebtMode=Report by rate of the VAT collected and paid (VAT rate)
VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid
VATReportByCustomersInDueDebtMode=Report by the customer VAT collected and paid
VATReportByQuartersInInputOutputMode=Report by rate of the VAT collected and paid
VATReportByQuartersInDueDebtMode=Report by rate of the VAT collected and paid
SeeVATReportInInputOutputMode=See report <b>%sVAT encasement%s</b> for a standard calculation
SeeVATReportInDueDebtMode=See report <b>%sVAT on flow%s</b> for a calculation with an option on the flow
RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment.<br>- For material assets, it includes the VAT invoices on the basis of the invoice date.
RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment.
RulesVATInProducts=- For material assets, it includes the VAT invoices on the basis of the invoice date.
RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date.
RulesVATDueProducts=- For material assets, it includes the VAT invoices, based on the invoice date.
@ -162,4 +166,5 @@ Mode1=Methode 1
Mode2=Method 2
CalculationRuleDesc=To calculate total VAT, there is two methods:<br>Method 1 is rounding vat on each line, then summing them.<br>Method 2 is summing all vat on each line, then rounding result.<br>Final result may differs from few cents. Default mode is mode <b>%s</b>.
CalculationRuleDescSupplier=according to supplier, choose appropriate method to apply same calculation rule and get same result expected by your supplier.
TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a <b>cash accountancy</b> mode is not relevant. This report is only available when using <b>engagement accountancy</b> mode (see setup of accountancy module).
CalculationMode=Calculation mode

View File

@ -21,6 +21,8 @@ Language_es_ES=Spanish
Language_es_AR=Spanish (Argentina)
Language_es_HN=Spanish (Honduras)
Language_es_MX=Spanish (Mexico)
Language_es_PY=Spanish (Paraguay)
Language_es_PE=Spanish (Peru)
Language_es_PR=Spanish (Puerto Rico)
Language_et_EE=Estonian
Language_fa_IR=Persian

View File

@ -143,11 +143,11 @@ NoStockForThisProduct=No stock for this product
NoStock=No Stock
Restock=Restock
ProductSpecial=Special
QtyMin=Min. Order Qty.
QtyMin=Minimum Qty
PriceQty=Price for this quantity
PriceQtyMin=MOQ Price (w/o discount)
PriceQtyMin=Price for this min. qty (w/o discount)
VATRateForSupplierProduct=VAT Rate (for this supplier/product)
DiscountQtyMin=MOQ Discount (by default)
DiscountQtyMin=Default discount for qty
NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product
NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this product
RecordedProducts=Products recorded

View File

@ -34,7 +34,7 @@ ShowPropal=Show proposal
PropalsDraft=Drafts
PropalsOpened=Opened
PropalsNotBilled=Closed not billed
PropalStatusDraft=Draft (needs validation)
PropalStatusDraft=Draft (needs to be validated)
PropalStatusValidated=Validated (proposal is open)
PropalStatusOpened=Validated (proposal is open)
PropalStatusClosed=Closed

View File

@ -95,8 +95,13 @@ Replenishment=Replenishment
ReplenishmentOrders=Replenishment orders
UseVirtualStock=Use virtual stock instead of physical stock
RuleForStockReplenishment=Rule for stocks replenishment
SelectProduct=Select at least one product
SelectProductWithNotNullQty=Select at least one product with a qty not null and a supplier
AlertOnly= Alerts only
WarehouseForStockDecrease=The warehouse <b>%s</b> will be used for stock decrease
WarehouseForStockIncrease=The warehouse <b>%s</b> will be used for stock increase
ForThisWarehouse=For this warehouse
ForThisWarehouse=For this warehouse
ReplenishmentStatusDesc=This is list of all product with a physical stock lower than desired stock (or alert value if checkbox "alert only" is checked) and suggest you to create supplier orders to fill the difference.
ReplenishmentOrdersDesc=This is list of all opened supplier orders
Replenishments=Replenishments
NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s)
NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s)

View File

@ -1,3 +1,6 @@
# Dolibarr language file - es_AR - companies
CHARSET=UTF-8
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
VATIntra=CUIT
VATIntraShort=CUIT
VATIntraVeryShort=CUIT

View File

@ -21,6 +21,8 @@ Language_es_ES=Español
Language_es_AR=Español (Argentina)
Language_es_HN=Español (Honduras)
Language_es_MX=Español (México)
Language_es_PY=Español (Paraguay)
Language_es_PE=Español (Perú)
Language_es_PR=Español (Puerto Rico)
Language_et_EE=Estonio
Language_fa_IR=Persa
@ -29,6 +31,7 @@ Language_fr_BE=Francés (Bélgica)
Language_fr_CA=Francés (Canadá)
Language_fr_CH=Francés (Suiza)
Language_fr_FR=Francés
Language_fr_NC=Francés (Nueva Caledonia)
Language_he_IL=Hebreo
Language_hu_HU=Húngaro
Language_is_IS=Islandés

View File

@ -1,4 +1,7 @@
# Dolibarr language file - es_HN - companies
CHARSET=UTF-8
VATIsUsed=Sujeto a ISV
VATIsNotUsed=No sujeto a ISV
VATIsNotUsed=No sujeto a ISV
VATIntra=RTN
VATIntraShort=RTN
VATIntraVeryShort=RTN

View File

@ -2,4 +2,7 @@
CHARSET=UTF-8
State=Estado
Town=Municipio
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
VATIntra=RFC
VATIntraShort=RFC
VATIntraVeryShort=RFC

View File

@ -1,4 +1,7 @@
# Dolibarr language file - es_PU - companies
CHARSET=UTF-8
VATIsUsed=Sujeto a IGV
VATIsNotUsed=No sujeto a IGV
VATIsNotUsed=No sujeto a IGV
VATIntra=RUC
VATIntraShort=RUC
VATIntraVeryShort=RUC

View File

@ -0,0 +1,5 @@
# Dolibarr language file - Source file is en_US - companies
CHARSET=UTF-8
VATIntra=RUC
VATIntraShort=RUC
VATIntraVeryShort=RUC

View File

@ -0,0 +1,3 @@
Dolibarr language file - es_PY - main
CHARSET=UTF-8
DIRECTION=ltr

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional-tunnuksen 3
ProfId4=Professional-tunnuksen 4
ProfId5=Ammatillinen tunnus 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -1405,8 +1405,8 @@ TaxSetup=Configuration du module Taxes, charges sociales et dividendes
OptionVatMode=Option d'exigibilité de TVA par défaut
OptionVATDefault=Standard
OptionVATDebitOption=Option services sur Débit
OptionVatDefaultDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens (en pratique on utilise la date de facturation)<br>- sur paiement pour les services
OptionVatDebitOptionDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens (en pratique on utilise la date de facturation)<br>- sur facturation (débit) pour les services
OptionVatDefaultDesc=TVA sur encaissement, l'exigibilité de la TVA est:<br>- sur livraison pour les biens (en pratique on utilise la date de facturation)<br>- sur paiement pour les services
OptionVatDebitOptionDesc=TVA sur débit, l'exigibilité de la TVA est:<br>- sur livraison pour les biens (en pratique on utilise la date de facturation)<br>- sur facturation (débit) pour les services
SummaryOfVatExigibilityUsedByDefault=Moment d'exigibilité par défaut de la TVA pour l'option choisie :
OnDelivery=Sur livraison
OnPayment=Sur paiement

View File

@ -79,10 +79,10 @@ ProductsCategoryShort=Catégorie produits
MembersCategoryShort=Catégorie adhérent
SuppliersCategoriesShort=Catégories fournisseurs
CustomersCategoriesShort=Catégories clients
CustomersProspectsCategoriesShort=Catégories clients/prospects
CustomersProspectsCategoriesShort=Catégories clients/prosp.
ProductsCategoriesShort=Catégories produits
MembersCategoriesShort=Catégories adhérents
ContactCategoriesShort=Catégorie Contacts
ContactCategoriesShort=Catégories contacts
ThisCategoryHasNoProduct=Cette catégorie ne contient aucun produit.
ThisCategoryHasNoSupplier=Cette catégorie ne contient aucun fournisseur.
ThisCategoryHasNoCustomer=Cette catégorie ne contient aucun client.

View File

@ -4,7 +4,7 @@ Accountancy=Compta
AccountancyCard=Fiche Compta
Treasury=Tréso
MenuFinancial=Compta/Tréso
TaxModuleSetupToModifyRules=Aller dans la <a href="%s">configuration du module</a> pour modifier les règles de calcul
TaxModuleSetupToModifyRules=Aller dans la <a href="%s">configuration du module Taxes</a> pour modifier les règles de calcul
OptionMode=Option de tenue de comptabilité
OptionModeTrue=Option Recettes-Dépenses
OptionModeVirtual=Option Créances-Dettes
@ -103,12 +103,16 @@ ConfirmPaySocialContribution=Êtes-vous sûr de vouloir classer cette charge soc
DeleteSocialContribution=Effacer charge sociale
ConfirmDeleteSocialContribution=Êtes-vous sûr de vouloir supprimer cette charge sociale ?
ExportDataset_tax_1=Charges sociales et paiements
AnnualSummaryDueDebtMode=Bilan des recettes et dépenses, résumé annuel, en mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>.
AnnualSummaryInputOutputMode=Bilan des recettes et dépenses, résumé annuel, en mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>.
AnnualByCompaniesDueDebtMode=Bilan des recettes et dépenses, détail par tiers, en mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>.
AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détail par tiers, en mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>.
SeeReportInInputOutputMode=Voir le rapport <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b> pour un calcul sur les paiements effectivement réalisés
SeeReportInDueDebtMode=Voir le rapport <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b> pour un calcul sur les factures émises
CalcModeVATDebt=Mode <b>%sTVA sur débit%s</b>.
CalcModeVATEngagement=Mode <b>%sTVA sur encaissement%s</b>.
CalcModeDebt=Mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>.
CalcModeEngagement=Mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>.
AnnualSummaryDueDebtMode=Bilan des recettes et dépenses, résumé annuel
AnnualSummaryInputOutputMode=Bilan des recettes et dépenses, résumé annuel
AnnualByCompaniesDueDebtMode=Bilan des recettes et dépenses, détail par tiers
AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détail par tiers
SeeReportInInputOutputMode=Cliquer sur <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b> pour un calcul sur les paiements effectivement réalisés
SeeReportInDueDebtMode=Cliquer sur <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b> pour un calcul sur les factures émises
RulesAmountWithTaxIncluded=- Les montants affichés sont les montants taxe incluse
RulesResultDue=- Il inclut les factures, charges et tva dues, qu'elles soient payées ou non.<br>- Il se base sur la date de validation pour les factures et la tva et sur la date d'échéance pour les charges.
RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TVA.<br>- Il se base sur la date de règlement de ces factures, charges et TVA.
@ -117,12 +121,12 @@ RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.
DepositsAreNotIncluded=- Les factures d'acomptes ne sont pas incluses
DepositsAreIncluded=- Les factures d'acomptes sont incluses
LT2ReportByCustomersInInputOutputModeES=Rapport par client des IRPF
VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées (TVA sur encaissement)
VATReportByCustomersInDueDebtMode=Rapport par client des TVA collectées et payées (TVA sur débit)
VATReportByQuartersInInputOutputMode=Rapport par taux des TVA collectées et payées (TVA sur encaissement)
VATReportByQuartersInDueDebtMode=Rapport par taux des TVA collectées et payées (TVA sur débit)
SeeVATReportInInputOutputMode=Voir le rapport <b>%sTVA encaissement%s</b> pour mode de calcul standard
SeeVATReportInDueDebtMode=Voir le rapport <b>%sTVA sur débit%s</b> pour mode de calcul avec option sur les débits
VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées
VATReportByCustomersInDueDebtMode=Rapport par client des TVA collectées et payées
VATReportByQuartersInInputOutputMode=Rapport par taux des TVA collectées et payées
VATReportByQuartersInDueDebtMode=Rapport par taux des TVA collectées et payées
SeeVATReportInInputOutputMode=Cliquer sur <b>%sTVA encaissement%s</b> pour mode de calcul standard
SeeVATReportInDueDebtMode=Cliquer sur <b>%sTVA sur débit%s</b> pour mode de calcul avec option sur les débits
RulesVATInServices=- Pour les services, le rapport inclut les TVA des règlements effectivement reçus ou émis en se basant sur la date du règlement.
RulesVATInProducts=- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de facture.
RulesVATDueServices=- Pour les services, le rapport inclut les TVA des factures dues, payées ou non en se basant sur la date de facture.
@ -162,4 +166,5 @@ Mode1=Mode 1
Mode2=Mode 2
CalculationRuleDesc=Pour calculer le total de TVA, il existe 2 modes:<br>Le mode 1 consiste à arrondir la tva de chaque ligne et à sommer cet arrondi.<br>Le mode 2 consiste à sommer la tva de chaque ligne puis à l'arrondir.<br>Les résultats peuvent différer de quelques centimes. Le mode par défaut est le mode <b>%s</b>.
CalculationRuleDescSupplier=Selon le mode utilisé par le fournisseur, choisissez le mode adéquant afin d'appliquer la même règle et obtenir un résultat identique au mode appliqué par votre fournisseur.
TurnoverPerProductInCommitmentAccountingNotRelevant=Le chiffre d'affaire par produit, dans une comptabilité en mode <b>comptabilité de caisse</b> n'est pas définissable. Ce rapport n'est disponible qu'en mode de comptabilité dit <b>comptabilité d'engagement</b> (voir la configuration du module de comptabilité).
CalculationMode=Mode de calcul

View File

@ -21,6 +21,8 @@ Language_es_ES=Espagnol
Language_es_AR=Espagnol (Argentine)
Language_es_HN=Espagnol (Honduras)
Language_es_MX=Espagnol (Mexique)
Language_es_PY=Espagnol (Paraguay)
Language_es_PE=Espagnol (Peru)
Language_es_PR=Espagnol (Puerto Rico)
Language_et_EE=Estonien
Language_fa_IR=Perse

View File

@ -95,8 +95,13 @@ Replenishment=Réapprovisionnement
ReplenishmentOrders=Commandes de réapprovisionnement
UseVirtualStock=Utiliser le stock théorique à la place du stock physique
RuleForStockReplenishment=Règle de gestion du réapprovisionnement des stocks
SelectProduct=Sélectionnez au moins un produit
SelectProductWithNotNullQty=Sélectionnez au moins un produit avec une quantité non nulle et un fournisseur
AlertOnly = Alertes seulement
WarehouseForStockDecrease=L'entrepôt <b>%s</b> sera utilisé pour la décrémentation du stock
WarehouseForStockIncrease=L'entrepôt <b>%s</b> sera utilisé pour l'incrémentation du stock
ForThisWarehouse=Pour cet entrepôt
ForThisWarehouse=Pour cet entrepôt
ReplenishmentStatusDesc=Cet écran permet de voir les produits avec un stock physique inférieure à la quantité minimale désirée (ou à la quantité du seuil d'alerte si la case "Alertes seulement" est cochée) et propose de créer des commandes fournisseurs pour compléter la différence
ReplenishmentOrdersDesc=Voici la liste des commandes fournisseurs en cours
Replenishments=Réapprovisionnement
NbOfProductBeforePeriod=Quantité du produit <b>%s</b> en stock avant la période sélectionnée (< <b>%s</b>)
NbOfProductAfterPeriod=Quantité du produit <b>%s</b> en stock après la période sélectionnée (> <b>%s</b>)

View File

@ -104,7 +104,7 @@ ProfId3=Szakmai ID 3
ProfId4=Szakmai ID 4
ProfId5=Szakmai ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof ID 1 (CUIT / CUIL)
ProfId1AR=Prof ID 1 (CUIL)
ProfId2AR=Prof ID 2 (revenu barmok)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / CUIL)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Profesjonell ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof ID 2 (inntekter på brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professioneel ID 3
ProfId4=Professioneel ID 4
ProfId5=Professionele ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (Cuit / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu woestelingen)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Profesjonalne ID 3
ProfId4=Profesjonalne ID 4
ProfId5=Profesjonalny ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Id Prof 2 (bydlęta Revenu)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=ID profesional 3
ProfId4=ID profesional 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / CUIL)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Id Prof 2 (brutos Revenu)
ProfId3AR=-
ProfId4AR=-
@ -224,9 +224,9 @@ ProfId3RU=Prof Id 3 (KPP)
ProfId4RU=Prof Id 4 (OKPO)
ProfId5RU=-
# ProfId6RU=-
VATIntra=IVA Intracomunitário
VATIntraShort=IVA Intracomunitário Mínimo
VATIntraVeryShort=IVA Intracomunitário Nulo
VATIntra=CNPJ
VATIntraShort=CNPJ
VATIntraVeryShort=CNPJ
VATIntraSyntaxIsValid=Sintaxe Válida
VATIntraValueIsValid=Valor Válido
ProspectCustomer=Cliente Potencial/Cliente

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Profesional ID 6
ProfId1AR=Id-ul prof. 1 (CUIT / Cuil)
ProfId1AR=Id-ul prof. 1 (CUIL)
ProfId2AR=Id-ul prof. 2 (Venituri brute)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Профессиональный ID 3
ProfId4=Профессиональный ID 4
ProfId5=Профессиональный ID 5
# ProfId6=Professional ID 6
ProfId1AR=Проф Id 1 (CUIT / Cuil)
ProfId1AR=Проф Id 1 (CUIL)
ProfId2AR=Проф Id 2 (Revenu скоты)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professionella ID 3
ProfId4=Professionella ID 4
ProfId5=Professionell ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu sällar)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Profesyonel ID 3
ProfId4=Profesyonel ID 4
ProfId5=Profesyonel ID 5
ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu canavarlar)
ProfId3AR=-
ProfId4AR=-

View File

@ -259,12 +259,16 @@ else
dol_print_error($db);
}
// ici le récap des ventes par trimestre de service et de produit
if (! empty($conf->product->enabled))
activitytrim(0);
if (! empty($conf->service->enabled))
activitytrim(1);
// TODO Move this into a page that should be available into menu "accountancy - report - turnover - per quarter"
// Also method used for counting must provide the 2 possible methods like done by all other reports into menu "accountancy - report - turnover":
// "commitment engagment" method and "cash accounting" method
if ($conf->global->MAIN_FEATURES_LEVEL)
{
if (! empty($conf->product->enabled)) activitytrim(0);
if (! empty($conf->service->enabled)) activitytrim(1);
}
//print '</td></tr></table>';
print '</div></div></div>';
@ -273,6 +277,9 @@ llxFooter();
$db->close();
function activitytrim($product_type)
{
global $conf,$langs,$db;
@ -281,7 +288,7 @@ function activitytrim($product_type)
$yearofbegindate=date('Y',dol_time_plus_duree(time(), -3, "y"));
// ventilation par trimestre
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, sum(fd.total_ht) as Mnttot";
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd";
$sql.= " , ".MAIN_DB_PREFIX."paiement as p,".MAIN_DB_PREFIX."paiement_facture as pf";
$sql.= " WHERE f.fk_soc = s.rowid";

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
*
* 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
@ -353,5 +353,35 @@ class MouvementStock
return $nbSP;
}
/**
* Count number of product in stock before a specific date
*
* @param int $productidselected Id of product to count
* @param timestamp $datebefore Date limit
* @return int Number
*/
function calculateBalanceForProductBefore($productidselected, $datebefore)
{
$nb=0;
$sql = 'SELECT SUM(value) as nb from '.MAIN_DB_PREFIX.'stock_mouvement';
$sql.= ' WHERE fk_product = '.$productidselected;
$sql.= " AND datem < '".$this->db->idate($datebefore)."'";
dol_syslog(get_class($this).__METHOD__.' sql='.$sql);
$resql=$this->db->query($sql);
if ($resql)
{
$obj=$this->db->fetch_object($resql);
if ($obj) $nb = $obj->nb;
return (empty($nb)?0:$nb);
}
else
{
dol_print_error($this->db);
return -1;
}
}
}
?>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -25,6 +25,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
@ -42,13 +43,14 @@ $id=GETPOST('id','int');
$product_id=GETPOST("product_id");
$action=GETPOST('action');
$cancel=GETPOST('cancel');
$idproduct = isset($_GET["idproduct"])?$_GET["idproduct"]:$_PRODUCT["idproduct"];
$year = isset($_GET["year"])?$_GET["year"]:$_POST["year"];
$month = isset($_GET["month"])?$_GET["month"]:$_POST["month"];
$search_movement = isset($_REQUEST["search_movement"])?$_REQUEST["search_movement"]:'';
$search_product = isset($_REQUEST["search_product"])?$_REQUEST["search_product"]:'';
$search_warehouse = isset($_REQUEST["search_warehouse"])?$_REQUEST["search_warehouse"]:'';
$search_user = isset($_REQUEST["search_user"])?$_REQUEST["search_user"]:'';
$idproduct = GETPOST('idproduct','int');
$year = GETPOST("year");
$month = GETPOST("month");
$search_movement = GETPOST("search_movement");
$search_product_ref = trim(GETPOST("search_product_ref"));
$search_product = trim(GETPOST("search_product"));
$search_warehouse = trim(GETPOST("search_warehouse"));
$search_user = trim(GETPOST("search_user"));
$page = GETPOST("page",'int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -63,6 +65,7 @@ if (GETPOST("button_removefilter"))
$year='';
$month='';
$search_movement="";
$search_product_ref="";
$search_product="";
$search_warehouse="";
$search_user="";
@ -109,12 +112,13 @@ if ($action == "correct_stock" && ! $_POST["cancel"])
$productstatic=new Product($db);
$warehousestatic=new Entrepot($db);
$movement=new MouvementStock($db);
$userstatic=new User($db);
$form=new Form($db);
$formother=new FormOther($db);
$formproduct=new FormProduct($db);
$sql = "SELECT p.rowid, p.label as produit, p.fk_product_type as type,";
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type,";
$sql.= " e.label as stock, e.rowid as entrepot_id,";
$sql.= " m.rowid as mid, m.value, m.datem, m.fk_user_author, m.label,";
$sql.= " u.login";
@ -145,6 +149,10 @@ if (! empty($search_movement))
{
$sql.= " AND m.label LIKE '%".$db->escape($search_movement)."%'";
}
if (! empty($search_product_ref))
{
$sql.= " AND p.ref LIKE '%".$db->escape($search_product_ref)."%'";
}
if (! empty($search_product))
{
$sql.= " AND p.label LIKE '%".$db->escape($search_product)."%'";
@ -157,7 +165,7 @@ if (! empty($search_user))
{
$sql.= " AND u.login LIKE '%".$db->escape($search_user)."%'";
}
if (! empty($_GET['idproduct']))
if ($idproduct > 0)
{
$sql.= " AND p.rowid = '".$idproduct."'";
}
@ -176,7 +184,7 @@ if ($resql)
$product->fetch($idproduct);
}
if ($_GET["id"])
if ($id > 0)
{
$entrepot = new Entrepot($db);
$result = $entrepot->fetch($id);
@ -190,7 +198,7 @@ if ($resql)
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
$texte = $langs->trans("ListOfStockMovements");
$texte.=' ('.$langs->trans("ForThisWarehouse").')';
if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')';
llxHeader("",$texte,$help_url);
/*
@ -392,6 +400,7 @@ if ($resql)
$param='';
if ($id) $param.='&id='.$id;
if ($search_movement) $param.='&search_movement='.urlencode($search_movement);
if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
if ($search_product) $param.='&search_product='.urlencode($search_product);
if ($search_warehouse) $param.='&search_warehouse='.urlencode($search_warehouse);
if ($sref) $param.='&sref='.urlencode($sref);
@ -406,7 +415,8 @@ if ($resql)
//print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"], "m.rowid","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"], "m.datem","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Product"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ProductRef"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ProductLabel"),$_SERVER["PHP_SELF"], "p.ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
@ -425,14 +435,18 @@ if ($resql)
print '</td>';
// Label of movement
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="12" name="search_movement" value="'.$search_movement.'">';
print '<input class="flat" type="text" size="10" name="search_movement" value="'.$search_movement.'">';
print '</td>';
// Product
// Product Ref
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="12" name="search_product" value="'.($idproduct?$product->libelle:$search_product).'">';
print '<input class="flat" type="text" size="6" name="search_product_ref" value="'.($idproduct?$product->ref:$search_product_ref).'">';
print '</td>';
// Product label
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="search_product" value="'.($idproduct?$product->libelle:$search_product).'">';
print '</td>';
print '<td class="liste_titre" align="left">';
//print '<input class="flat" type="text" size="10" name="search_warehouse" value="'.($search_warehouse).'">'; // We are on a specific warehouse card, no filter on other should be possible
if (empty($idproduct) || $idproduct < 0) print '<input class="flat" type="text" size="10" name="search_warehouse" value="'.($search_warehouse).'">'; // We are on a specific warehouse card, no filter on other should be possible
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="6" name="search_user" value="'.($search_user).'">';
@ -445,10 +459,15 @@ if ($resql)
print "</tr>\n";
print '</form>';
$arrayofuniqueproduct=array();
$var=True;
while ($i < min($num,$conf->liste_limit))
{
$objp = $db->fetch_object($resql);
$arrayofuniqueproduct[$objp->rowid]=$objp->produit;
$var=!$var;
print "<tr ".$bc[$var].">";
// Id movement
@ -457,7 +476,14 @@ if ($resql)
print '<td>'.dol_print_date($db->jdate($objp->datem),'dayhour').'</td>';
// Label of movement
print '<td>'.$objp->label.'</td>';
// Product
// Product ref
print '<td>';
$productstatic->id=$objp->rowid;
$productstatic->ref=$objp->product_ref;
$productstatic->type=$objp->type;
print $productstatic->getNomUrl(1,'',16);
print "</td>\n";
// Product label
print '<td>';
$productstatic->id=$objp->rowid;
$productstatic->ref=$objp->produit;
@ -485,7 +511,38 @@ if ($resql)
}
$db->free($resql);
print "</table>";
print "</table><br>";
// Add number of product when there is a filter on period
if (count($arrayofuniqueproduct) == 1)
{
$productidselected=0;
foreach ($arrayofuniqueproduct as $key => $val)
{
$productidselected=$key;
$productlabelselected=$val;
}
$datebefore=dol_get_first_day($year, $month?$month:1, true);
$dateafter=dol_get_last_day($year, $month?$month:12, true);
$balancebefore=$movement->calculateBalanceForProductBefore($productidselected, $datebefore);
$balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter);
//print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductBeforePeriod", $productlabelselected, dol_print_date($datebefore,'day','gmt'));
//print '</td>';
//print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balancebefore;
print "<br>\n";
//print '</td></tr>';
//print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter,'day','gmt'));
//print '</td>';
//print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balanceafter;
print "<br>\n";
//print '</td></tr>';
}
}
else

View File

@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Laurent Destaileur <ely@users.sourceforge.net>
*
* 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
@ -67,7 +67,8 @@ $offset = $limit * $page ;
* Actions
*/
if (isset($_POST['button_removefilter']) || isset($_POST['valid'])) {
if (isset($_POST['button_removefilter']) || isset($_POST['valid']))
{
$sref = '';
$snom = '';
$sal = '';
@ -75,16 +76,19 @@ if (isset($_POST['button_removefilter']) || isset($_POST['valid'])) {
}
//orders creation
//FIXME: could go in the lib
if ($action == 'order' && isset($_POST['valid'])) {
//TODO: could go in the lib
if ($action == 'order' && isset($_POST['valid']))
{
$linecount = GETPOST('linecount', 'int');
$box = 0;
unset($_POST['linecount']);
if ($linecount > 0) {
$suppliers = array();
for ($i = 0; $i < $linecount; $i++) {
if(GETPOST($i, 'alpha') === 'on'
&& GETPOST('fourn' . $i, 'int') > 0) { //one line
for ($i = 0; $i < $linecount; $i++)
{
if (GETPOST($i, 'alpha') === 'on' && GETPOST('fourn' . $i, 'int') > 0)
{
//one line
$box = $i;
$supplierpriceid = GETPOST('fourn'.$i, 'int');
//get all the parameters needed to create a line
@ -95,22 +99,28 @@ if ($action == 'order' && isset($_POST['valid'])) {
$sql .= MAIN_DB_PREFIX . 'product_fournisseur_price';
$sql .= ' WHERE rowid = ' . $supplierpriceid;
$resql = $db->query($sql);
if ($resql && $db->num_rows($resql) > 0) {
//might need some value checks
$obj = $db->fetch_object($resql);
$line = new CommandeFournisseurLigne($db);
$line->qty = $qty;
$line->desc = $desc;
$line->fk_product = $obj->fk_product;
$line->tva_tx = $obj->tva_tx;
$line->subprice = $obj->unitprice;
$line->total_ht = $obj->unitprice * $qty;
$tva = $line->tva_tx / 100;
$line->total_tva = $line->total_ht * $tva;
$line->total_ttc = $line->total_ht + $line->total_tva;
$line->ref_fourn = $obj->ref_fourn;
$suppliers[$obj->fk_soc]['lines'][] = $line;
} else {
if ($resql && $db->num_rows($resql) > 0)
{
if ($qty)
{
//might need some value checks
$obj = $db->fetch_object($resql);
$line = new CommandeFournisseurLigne($db);
$line->qty = $qty;
$line->desc = $desc;
$line->fk_product = $obj->fk_product;
$line->tva_tx = $obj->tva_tx;
$line->subprice = $obj->unitprice;
$line->total_ht = $obj->unitprice * $qty;
$tva = $line->tva_tx / 100;
$line->total_tva = $line->total_ht * $tva;
$line->total_ttc = $line->total_ht + $line->total_tva;
$line->ref_fourn = $obj->ref_fourn;
$suppliers[$obj->fk_soc]['lines'][] = $line;
}
}
else
{
$error=$db->lasterror();
dol_print_error($db);
dol_syslog('replenish.php: '.$error, LOG_ERR);
@ -120,11 +130,13 @@ if ($action == 'order' && isset($_POST['valid'])) {
}
unset($_POST[$i]);
}
//we now know how many orders we need and what lines they have
$i = 0;
$orders = array();
$suppliersid = array_keys($suppliers);
foreach ($suppliers as $supplier) {
foreach ($suppliers as $supplier)
{
$order = new CommandeFournisseur($db);
$order->socid = $suppliersid[$i];
//trick to know which orders have been generated this way
@ -150,23 +162,25 @@ if ($action == 'order' && isset($_POST['valid'])) {
}
}
if ($box == 0) {
setEventMessage($langs->trans('SelectProduct'), 'warnings');
setEventMessage($langs->trans('SelectProductWithNotNullQty'), 'warnings');
}
}
/*
* View
*/
$title = $langs->trans('Status');
$sql = 'SELECT p.rowid, p.ref, p.label, p.price';
$sql .= ', p.price_ttc, p.price_base_type,p.fk_product_type';
$sql .= ', p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,';
$sql .= ' SUM(COALESCE(s.reel, 0)) as stock_physique';
$sql .= ', p.desiredstock';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s';
$sql .= ' ON p.rowid = s.fk_product';
$sql = 'SELECT p.rowid, p.ref, p.label, p.price,';
$sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,';
$sql.= ' p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,';
$sql.= ' p.desiredstock,';
$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') as stock_physique';
$sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
$sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s';
$sql.= ' ON p.rowid = s.fk_product';
$sql.= ' WHERE p.entity IN (' . getEntity("product", 1) . ')';
if ($sall) {
$sql .= ' AND (p.ref LIKE "%'.$db->escape($sall).'%" ';
@ -179,7 +193,7 @@ if (dol_strlen($type)) {
if ($type == 1) {
$sql .= ' AND p.fk_product_type = 1';
} else {
$sql .= ' AND p.fk_product_type != 1';
$sql .= ' AND p.fk_product_type <> 1';
}
}
if ($sref) {
@ -196,385 +210,402 @@ if ($snom) {
$sql .= ' AND p.label LIKE "%' . $db->escape($crit) . '%"';
}
}
$sql .= ' AND p.tobuy = 1';
if (!empty($canvas)) {
$sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"';
}
$sql .= ' GROUP BY p.rowid, p.ref, p.label, p.price';
$sql .= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms';
$sql .= ', p.duration, p.tobuy, p.seuil_stock_alerte';
$sql .= ', p.desiredstock, s.fk_product';
$sql .= ' HAVING p.desiredstock > SUM(COALESCE(s.reel, 0))';
$sql .= ' AND p.desiredstock > 0';
if ($salert == 'on') {
$sql .= ' AND SUM(COALESCE(s.reel, 0)) < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL';
$sql.= ' AND p.tobuy = 1';
if (!empty($canvas)) $sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"';
$sql.= ' GROUP BY p.rowid, p.ref, p.label, p.price';
$sql.= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms';
$sql.= ', p.duration, p.tobuy, p.seuil_stock_alerte';
$sql.= ', p.desiredstock, s.fk_product';
$sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").')';
$sql.= ' AND p.desiredstock > 0';
if ($salert == 'on') // Option to see when stock is lower than alert
{
$sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL';
$alertchecked = 'checked="checked"';
}
$sql .= $db->order($sortfield,$sortorder);
$sql .= $db->plimit($limit + 1, $offset);
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1, $offset);
dol_syslog('Execute request sql='.$sql);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|';
$helpurl .= 'ES:M&oacute;dulo_Stocks';
llxHeader('', $title, $helpurl, $title);
$head = array();
$head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php';
$head[0][1] = $title;
$head[0][2] = 'replenish';
$head[1][0] = DOL_URL_ROOT.'/product/stock/replenishorders.php';
$head[1][1] = $langs->trans("ReplenishmentOrders");
$head[1][2] = 'replenishorders';
dol_fiche_head($head, 'replenish', $langs->trans('Replenishment'), 0, 'stock');
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&sall=' . $sall;
$filters .= '&salert=' . $salert;
print_barre_liste(
$texte,
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num
);
} else {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&fourn_id=' . $fourn_id;
$filters .= (isset($type)?'&type=' . $type:'');
$filters .= '&salert=' . $salert;
print_barre_liste(
$texte,
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num
);
}
print '<form action="replenish.php" method="post" name="formulaire">'.
'<input type="hidden" name="token" value="' .$_SESSION['newtoken'] . '">'.
'<input type="hidden" name="sortfield" value="' . $sortfield . '">'.
'<input type="hidden" name="sortorder" value="' . $sortorder . '">'.
'<input type="hidden" name="type" value="' . $type . '">'.
'<input type="hidden" name="linecount" value="' . $num . '">'.
'<input type="hidden" name="action" value="order">'.
'<table class="liste" width="100%">';
$param = (isset($type)? '&type=' . $type : '');
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert;
$param .= '&sref=' . $sref;
// Lignes des titres
print '<tr class="liste_titre">'.
'<td><input type="checkbox" onClick="toggle(this)" /></td>';
print_liste_field_titre(
$langs->trans('Ref'),
'replenish.php',
'p.ref',
$param,
'',
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Label'),
'replenish.php',
'p.label',
$param,
'',
'',
$sortfield,
$sortorder
);
if (!empty($conf->service->enabled) && $type == 1)
{
print_liste_field_titre(
$langs->trans('Duration'),
'replenish.php',
'p.duration',
$param,
'',
'align="center"',
$sortfield,
$sortorder
);
}
print_liste_field_titre(
$langs->trans('DesiredStock'),
'replenish.php',
'p.desiredstock',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
if ($conf->global->USE_VIRTUAL_STOCK)
{
$stocklabel = $langs->trans('VirtualStock');
}
else
{
$stocklabel = $langs->trans('PhysicalStock');
}
print_liste_field_titre(
$stocklabel,
'replenish.php',
'stock_physique',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Ordered'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('StockToBuy'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Supplier'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print '<td>&nbsp;</td>'.
'</tr>'.
// Lignes des champs de filtre
'<tr class="liste_titre">'.
'<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre">'.
'<input class="flat" type="text" name="sref" value="' . $sref . '">'.
'</td>'.
'<td class="liste_titre">'.
'<input class="flat" type="text" name="snom" value="' . $snom . '">'.
'</td>';
if (!empty($conf->service->enabled) && $type == 1)
{
print '<td class="liste_titre">'.
'&nbsp;'.
'</td>';
}
print '<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&nbsp;<input type="checkbox" name="salert" ' . $alertchecked . '></td>'.
'<td class="liste_titre" align="right">&nbsp;</td>'.
'<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre" align="right">'.
'<input type="image" class="liste_titre" name="button_search"'.
'src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" alt="' . $langs->trans("Search") . '">'.
'<input type="image" class="liste_titre" name="button_removefilter"
src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'.
'</td>'.
'</tr>';
$prod = new Product($db);
$var = True;
while ($i < min($num, $limit)) {
$objp = $db->fetch_object($resql);
if ($conf->global->STOCK_SUPPORTS_SERVICES
|| $objp->fk_product_type == 0) {
// Multilangs
if (! empty($conf->global->MAIN_MULTILANGS)) {
$sql = 'SELECT label';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product_lang';
$sql .= ' WHERE fk_product = ' . $objp->rowid;
$sql .= ' AND lang = "' . $langs->getDefaultLang() . '"';
$sql .= ' LIMIT 1';
$result = $db->query($sql);
if ($result) {
$objtp = $db->fetch_object($result);
if (!empty($objtp->label)) {
$objp->label = $objtp->label;
}
}
}
$form = new Form($db);
$var =! $var;
$prod->ref = $objp->ref;
$prod->id = $objp->rowid;
$prod->type = $objp->fk_product_type;
$ordered = ordered($prod->id);
if ($conf->global->USE_VIRTUAL_STOCK) {
//compute virtual stock
$prod->fetch($prod->id);
$result=$prod->load_stats_commande(0, '1,2');
if ($result < 0) {
dol_print_error($db, $prod->error);
}
$stock_commande_client = $prod->stats_commande['qty'];
$result=$prod->load_stats_commande_fournisseur(0, '3');
if ($result < 0) {
dol_print_error($db,$prod->error);
}
$stock_commande_fournisseur = $prod->stats_commande_fournisseur['qty'];
$stock = $objp->stock_physique - $stock_commande_client + $stock_commande_fournisseur;
} else {
$stock = $objp->stock_physique;
}
$warning='';
if ($objp->seuil_stock_alerte
&& ($stock < $objp->seuil_stock_alerte)) {
$warning = img_warning($langs->trans('StockTooLow')) . ' ';
}
//depending on conf, use either physical stock or
//virtual stock to compute the stock to buy value
$stocktobuy = max($objp->desiredstock - $stock - $ordered, 0);
$disabled = '';
if($ordered > 0) {
if($ordered + $stock >= $objp->desiredstock) {
$picto = img_picto('', './img/yes', '', 1);
$disabled = 'disabled="disabled"';
}
else {
$picto = img_picto('', './img/no', '', 1);
}
} else {
$picto = img_picto('', './img/no', '', 1);
}
print '<tr ' . $bc[$var] . '>'.
'<td><input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td>'.
'<td class="nowrap">'.
$prod->getNomUrl(1, '', 16).
'</td>'.
'<td>' . $objp->label . '</td>'.
'<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" >';
if (!empty($conf->service->enabled) && $type == 1) {
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationYear');
} elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationMonth');
} elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationDay');
} else {
$duration = $objp->duration;
}
print '<td align="center">'.
$duration.
'</td>';
}
print '<td align="right">' . $objp->desiredstock . '</td>'.
'<td align="right">'.
$warning . $stock.
'</td>'.
'<td align="right">'.
'<a href="replenishorders.php?sproduct=' . $prod->id . '">'.
$ordered . '</a> ' . $picto.
'</td>'.
'<td align="right">'.
'<input type="text" name="tobuy' . $i .
'" value="' . $stocktobuy . '" ' . $disabled . '>'.
'</td>'.
'<td align="right">'.
$form->select_product_fourn_price($prod->id, 'fourn'.$i, 1).
'</td>'.
'<td>&nbsp</td>'.
'</tr>';
}
$i++;
}
$value = $langs->trans("CreateOrders");
print '</table>'.
'</div>'.
'<table width="100%">'.
'<tr><td align="right">'.
'<input class="butAction" type="submit" name="valid" value="' . $value . '">'.
'</td></tr></table>'.
'</form>';
if ($num > $conf->liste_limit)
{
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha'))
{
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&sall=' . $sall;
$filters .= '&salert=' . $salert;
print_barre_liste(
'',
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num,
0,
''
);
} else {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&fourn_id=' . $fourn_id;
$filters .= (isset($type)? '&type=' . $type : '');
$filters .= '&salert=' . $salert;
print_barre_liste(
'',
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num,
0,
''
);
}
}
$db->free($resql);
print ' <script type="text/javascript">
function toggle(source)
{
checkboxes = document.getElementsByClassName("check");
for (var i=0; i < checkboxes.length;i++) {
if (!checkboxes[i].disabled) {
checkboxes[i].checked = source.checked;
}
}
} </script>';
} else {
if (empty($resql))
{
dol_print_error($db);
exit;
}
$num = $db->num_rows($resql);
$i = 0;
$helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|';
$helpurl .= 'ES:M&oacute;dulo_Stocks';
llxHeader('', $title, $helpurl, $title);
$head = array();
$head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php';
$head[0][1] = $title;
$head[0][2] = 'replenish';
$head[1][0] = DOL_URL_ROOT.'/product/stock/replenishorders.php';
$head[1][1] = $langs->trans("ReplenishmentOrders");
$head[1][2] = 'replenishorders';
dol_fiche_head($head, 'replenish', $langs->trans('Replenishment'), 0, 'stock');
print $langs->trans("ReplenishmentStatusDesc").'<br><br>';
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&sall=' . $sall;
$filters .= '&salert=' . $salert;
print_barre_liste(
$texte,
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num
);
} else {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&fourn_id=' . $fourn_id;
$filters .= (isset($type)?'&type=' . $type:'');
$filters .= '&salert=' . $salert;
print_barre_liste(
$texte,
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num
);
}
print '<form action="replenish.php" method="post" name="formulaire">'.
'<input type="hidden" name="token" value="' .$_SESSION['newtoken'] . '">'.
'<input type="hidden" name="sortfield" value="' . $sortfield . '">'.
'<input type="hidden" name="sortorder" value="' . $sortorder . '">'.
'<input type="hidden" name="type" value="' . $type . '">'.
'<input type="hidden" name="linecount" value="' . $num . '">'.
'<input type="hidden" name="action" value="order">'.
'<table class="liste" width="100%">';
$param = (isset($type)? '&type=' . $type : '');
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert;
$param .= '&sref=' . $sref;
// Lignes des titres
print '<tr class="liste_titre">'.
'<td><input type="checkbox" onClick="toggle(this)" /></td>';
print_liste_field_titre(
$langs->trans('Ref'),
'replenish.php',
'p.ref',
$param,
'',
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Label'),
'replenish.php',
'p.label',
$param,
'',
'',
$sortfield,
$sortorder
);
if (!empty($conf->service->enabled) && $type == 1)
{
print_liste_field_titre(
$langs->trans('Duration'),
'replenish.php',
'p.duration',
$param,
'',
'align="center"',
$sortfield,
$sortorder
);
}
print_liste_field_titre(
$langs->trans('DesiredStock'),
'replenish.php',
'p.desiredstock',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
if ($conf->global->USE_VIRTUAL_STOCK)
{
$stocklabel = $langs->trans('VirtualStock');
}
else
{
$stocklabel = $langs->trans('PhysicalStock');
}
print_liste_field_titre(
$stocklabel,
'replenish.php',
'stock_physique',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Ordered'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('StockToBuy'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print_liste_field_titre(
$langs->trans('Supplier'),
'replenish.php',
'',
$param,
'',
'align="right"',
$sortfield,
$sortorder
);
print '</tr>';
// Lignes des champs de filtre
print '<tr class="liste_titre">'.
'<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre">'.
'<input class="flat" type="text" name="sref" size="8" value="'.dol_escape_htmltag($sref).'">'.
'</td>'.
'<td class="liste_titre">'.
'<input class="flat" type="text" name="snom" size="8" value="'.dol_escape_htmltag($snom).'">'.
'</td>';
if (!empty($conf->service->enabled) && $type == 1)
{
print '<td class="liste_titre">&nbsp;</td>';
}
print '<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&nbsp;<input type="checkbox" name="salert" ' . $alertchecked . '></td>'.
'<td class="liste_titre" align="right">&nbsp;</td>'.
'<td class="liste_titre">&nbsp;</td>'.
'<td class="liste_titre" align="right">'.
'<input type="image" class="liste_titre" name="button_search"'.
'src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" alt="' . $langs->trans("Search") . '">'.
'<input type="image" class="liste_titre" name="button_removefilter"
src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'.
'</td>'.
'</tr>';
$prod = new Product($db);
$var = True;
while ($i < min($num, $limit))
{
$objp = $db->fetch_object($resql);
if ($conf->global->STOCK_SUPPORTS_SERVICES || $objp->fk_product_type == 0)
{
// Multilangs
if (! empty($conf->global->MAIN_MULTILANGS))
{
$sql = 'SELECT label';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product_lang';
$sql .= ' WHERE fk_product = ' . $objp->rowid;
$sql .= ' AND lang = "' . $langs->getDefaultLang() . '"';
$sql .= ' LIMIT 1';
$resqlm = $db->query($sql);
if ($resqlm)
{
$objtp = $db->fetch_object($resqlm);
if (!empty($objtp->label)) $objp->label = $objtp->label;
}
}
$form = new Form($db);
$var =! $var;
$prod->ref = $objp->ref;
$prod->id = $objp->rowid;
$prod->type = $objp->fk_product_type;
$ordered = ordered($prod->id);
if ($conf->global->USE_VIRTUAL_STOCK)
{
//compute virtual stock
$prod->fetch($prod->id);
$result=$prod->load_stats_commande(0, '1,2');
if ($result < 0) {
dol_print_error($db, $prod->error);
}
$stock_commande_client = $prod->stats_commande['qty'];
$result=$prod->load_stats_commande_fournisseur(0, '3');
if ($result < 0) {
dol_print_error($db,$prod->error);
}
$stock_commande_fournisseur = $prod->stats_commande_fournisseur['qty'];
$stock = $objp->stock_physique - $stock_commande_client + $stock_commande_fournisseur;
}
else
{
$stock = $objp->stock_physique;
}
$warning='';
if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte))
{
$warning = img_warning($langs->trans('StockTooLow')) . ' ';
}
//depending on conf, use either physical stock or
//virtual stock to compute the stock to buy value
$stocktobuy = max($objp->desiredstock - $stock - $ordered, 0);
$disabled = '';
if($ordered > 0) {
if($ordered + $stock >= $objp->desiredstock) {
$picto = img_picto('', './img/yes', '', 1);
$disabled = 'disabled="disabled"';
}
else {
$picto = img_picto('', './img/no', '', 1);
}
} else {
$picto = img_picto('', './img/no', '', 1);
}
print '<tr '.$bc[$var].'>';
// Select field
//print '<td><input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td>';
print '<td><input type="checkbox" class="check" name="'.$i.'"></td>';
print '<td class="nowrap">'.
$prod->getNomUrl(1, '', 16).
'</td>'.
'<td>' . $objp->label . '</td>'.
'<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" >';
if (!empty($conf->service->enabled) && $type == 1) {
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationYear');
} elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationMonth');
} elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) {
$duration = $regs[1] . ' ' . $langs->trans('DurationDay');
} else {
$duration = $objp->duration;
}
print '<td align="center">'.
$duration.
'</td>';
}
print '<td align="right">' . $objp->desiredstock . '</td>'.
'<td align="right">'.
$warning . $stock.
'</td>'.
'<td align="right">'.
'<a href="replenishorders.php?sproduct=' . $prod->id . '">'.
$ordered . '</a> ' . $picto.
'</td>';
// To order
//print '<td align="right"><input type="text" name="tobuy'.$i.'" value="'.$stocktobuy.'" '.$disabled.'></td>';
print '<td align="right"><input type="text" size="4" name="tobuy'.$i.'" value="'.$stocktobuy.'"></td>';
// Supplier
print '<td align="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, 1).'</td>';
print '</tr>';
}
$i++;
}
$value = $langs->trans("CreateOrders");
print '</table>'.
'</div>'.
'<table width="100%">'.
'<tr><td align="center">'.
'<input class="button" type="submit" name="valid" value="' . $value . '">'.
'</td></tr></table>'.
'</form>';
if ($num > $conf->liste_limit)
{
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha'))
{
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&sall=' . $sall;
$filters .= '&salert=' . $salert;
print_barre_liste(
'',
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num,
0,
''
);
} else {
$filters = '&sref=' . $sref . '&snom=' . $snom;
$filters .= '&fourn_id=' . $fourn_id;
$filters .= (isset($type)? '&type=' . $type : '');
$filters .= '&salert=' . $salert;
print_barre_liste(
'',
$page,
'replenish.php',
$filters,
$sortfield,
$sortorder,
'',
$num,
0,
''
);
}
}
$db->free($resql);
print '
<script type="text/javascript">
function toggle(source)
{
checkboxes = document.getElementsByClassName("check");
for (var i=0; i < checkboxes.length;i++) {
if (!checkboxes[i].disabled) {
checkboxes[i].checked = source.checked;
}
}
}
</script>';
llxFooter();
$db->close();
?>
?>

View File

@ -48,7 +48,9 @@ $head[0][2] = 'replenish';
$head[1][0] = DOL_URL_ROOT.'/product/stock/replenishorders.php';
$head[1][1] = $texte;
$head[1][2] = 'replenishorders';
dol_fiche_head($head, 'replenishorders', $langs->trans('Replenishment'), 0, 'stock');
$commandestatic = new CommandeFournisseur($db);
$sref = GETPOST('search_ref', 'alpha');
$snom = GETPOST('search_nom', 'alpha');
@ -72,21 +74,15 @@ if (!$sortfield) {
$offset = $conf->liste_limit * $page ;
$sql = 'SELECT s.rowid as socid, s.nom, cf.date_creation as dc,';
$sql .= ' cf.rowid, cf.ref, cf.fk_statut, cf.total_ttc';
$sql .= ", cf.fk_user_author, u.login";
$sql .= ' FROM (' . MAIN_DB_PREFIX . 'societe as s,';
$sql .= ' ' . MAIN_DB_PREFIX . 'commande_fournisseur as cf';
$sql.= ' cf.rowid, cf.ref, cf.fk_statut, cf.total_ttc, cf.fk_user_author,';
$sql.= ' u.login';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'commande_fournisseur as cf';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON cf.fk_user_author = u.rowid';
if (!$user->rights->societe->client->voir && !$socid) {
$sql.= ', ' . MAIN_DB_PREFIX . 'societe_commerciaux as sc';
}
$sql .= ') LEFT JOIN ' . MAIN_DB_PREFIX . 'user as u ';
$sql .= 'ON cf.fk_user_author = u.rowid';
$sql .= ' WHERE cf.fk_soc = s.rowid ';
$sql .= ' AND cf.entity = ' . $conf->entity;
$sql.= ' WHERE cf.fk_soc = s.rowid ';
$sql.= ' AND cf.entity = ' . $conf->entity;
if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) {
$sql .= ' AND cf.fk_statut < 3';
} elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) {
@ -94,7 +90,6 @@ if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) {
} else {
$sql .= ' AND cf.fk_statut < 5';
}
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = ' . $user->id;
}
@ -117,13 +112,13 @@ if ($suser) {
if ($sttc) {
$sql .= ' AND cf.total_ttc = ' . price2num($sttc);
}
if ($sdate)
if ($sdate)
{
if (GETPOST('search_datemonth', 'int') && GETPOST('search_dateday', 'int') && GETPOST('search_dateyear', 'int'))
if (GETPOST('search_datemonth', 'int') && GETPOST('search_dateday', 'int') && GETPOST('search_dateyear', 'int'))
{
$date = dol_mktime(0, 0, 0, GETPOST('search_datemonth', 'int'), GETPOST('search_dateday', 'int'), GETPOST('search_dateyear', 'int'));
}
else
else
{
$date = dol_stringtotime($sdate);
}
@ -145,20 +140,24 @@ $sql .= ', cf.total_ttc, cf.fk_user_author, u.login, s.rowid, s.nom';
$sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder . ' ';
$sql .= $db->plimit($conf->liste_limit+1, $offset);
$resql = $db->query($sql);
if ($resql)
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
print $langs->trans("ReplenishmentOrdersDesc").'<br><br>';
print_barre_liste(
$langs->trans('ReplenishmentOrders'),
'',
$page,
'replenishorders.php',
'',
$sortfield,
$sortorder,
'',
$num
$num,
0,
''
);
print '<form action="replenishorders.php" method="GET">'.
'<table class="noborder" width="100%">'.
@ -255,8 +254,7 @@ if ($resql)
{
$obj = $db->fetch_object($resql);
$var = !$var;
if (!dispatched($obj->rowid) &&
(!$sproduct || in_array($sproduct, getProducts($obj->rowid))))
if (!dispatched($obj->rowid) && (!$sproduct || in_array($sproduct, getProducts($obj->rowid))))
{
$href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid;
print '<tr ' . $bc[$var] . '>'.
@ -288,9 +286,10 @@ if ($resql)
'<td>'.
price($obj->total_ttc).
'</td>';
// Date
if ($obj->dc) {
$date = dol_print_date($db->jdate($obj->dc), 'day');
$date = dol_print_date($db->jdate($obj->dc), 'dayhour');
} else {
$date = '-';
}
@ -310,6 +309,10 @@ if ($resql)
$db->free($resql);
}
else
{
dol_print_error($db);
}
llxFooter();
$db->close();

View File

@ -1,524 +0,0 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/societe/class/address.class.php
* \ingroup societe
* \brief Fichier de la classe des adresses des tiers
*/
/**
* \class Address
* \brief Class to manage addresses
*/
class Address
{
var $db;
var $id;
var $type;
var $label;
var $socid;
var $name;
var $address;
var $zip;
var $town;
var $country_id;
var $country_code;
var $phone;
var $fax;
var $note;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function __construct($db)
{
$this->db = $db;
}
/**
* Create address into database
*
* @param int $socid Company socid
* @param User $user Object user making creation
* @return int 0 if OK, < 0 if KO
*/
function create($socid, $user='')
{
global $langs,$conf;
// Nettoyage parametres
$this->name = trim($this->name);
$this->label = trim($this->label);
dol_syslog(get_class($this)."::create label=".$this->label);
$this->db->begin();
$result = $this->verify();
if ($result >= 0)
{
$now=dol_now();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_address (label, fk_soc, name, datec, fk_user_creat) ";
$sql .= " VALUES ('".$this->db->escape($this->label)."', '".$socid."', '".$this->db->escape($this->name)."', ".$this->db->idate($now).", '".$user->id."')";
$result=$this->db->query($sql);
if ($result)
{
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_address");
$ret = $this->update($this->id, $socid, $user);
if ($ret >= 0)
{
dol_syslog(get_class($this)."::create success id=".$this->id);
$this->db->commit();
return 0;
}
else
{
dol_syslog(get_class($this)."::create echec update");
$this->db->rollback();
return -3;
}
}
else
{
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom);
}
else
{
dol_syslog(get_class($this)."::create echec insert sql=$sql");
}
$this->db->rollback();
return -2;
}
}
else
{
$this->db->rollback();
dol_syslog(get_class($this)."::create echec verify sql=$sql");
return -1;
}
}
/**
* Verification lors de la modification de l'adresse
*
* @return int 0 if OK, <0 if KO
*/
function verify()
{
$this->label = trim($this->label);
$this->name = trim($this->name);
$result = 0;
if (!$this->name || !$this->label)
{
$this->error = "The name of company and the label can not be empty.\n";
$result = -2;
}
return $result;
}
/**
* Mise a jour des parametres de l'adresse
*
* @param int $id id address
* @param int $socid id third party
* @param User $user Utilisateur qui demande la mise a jour
* @return int <0 if KO, >=0 if OK
*/
function update($id, $socid, $user='')
{
global $langs;
// Clean parameters
$this->fk_soc = $socid;
$this->label = trim($this->label);
$this->name = trim($this->name);
$this->address = trim($this->address);
$this->zip = trim($this->zip);
$this->town = trim($this->town);
$this->country_id = trim($this->country_id);
$this->phone = trim($this->phone);
$this->phone = preg_replace("/\s/","",$this->phone);
$this->phone = preg_replace("/\./","",$this->phone);
$this->fax = trim($this->fax);
$this->fax = preg_replace("/\s/","",$this->fax);
$this->fax = preg_replace("/\./","",$this->fax);
$this->note = trim($this->note);
$result = $this->verify(); // Verifie que nom et label obligatoire
if ($result >= 0)
{
dol_syslog(get_class($this)."::Update verify ok");
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_address";
$sql.= " SET label = '" . $this->db->escape($this->label) ."'"; // Champ obligatoire
$sql.= ", name = '" . $this->db->escape($this->name) ."'"; // Champ obligatoire
$sql.= ", address = ".($this->address?"'".$this->db->escape($this->address)."'":"null");
$sql.= ", zip = ".($this->zip?"'".$this->db->escape($this->zip)."'":"null");
$sql.= ", town = ".($this->town?"'".$this->db->escape($this->town)."'":"null");
$sql.= ", fk_pays = '" . ($this->country_id?$this->db->escape($this->country_id):'0') ."'";
$sql.= ", note = ".($this->note?"'".$this->db->escape($this->note)."'":"null");
$sql.= ", phone = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null");
$sql.= ", fax = ".($this->fax?"'".$this->db->escape($this->fax)."'":"null");
if ($user) $sql .= ",fk_user_modif = '".$user->id."'";
$sql .= " WHERE fk_soc = '" . $socid ."' AND rowid = '" . $this->db->escape($id) ."'";
dol_syslog(get_class($this)."::Update sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
dol_syslog(get_class($this)."::Update success");
$this->db->commit();
return 1;
}
else
{
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$langs->trans("ErrorDuplicateField",$this->name);
$result=-1;
}
else
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::Update error sql=".$sql, LOG_ERR);
$result=-2;
}
$this->db->rollback();
return $result;
}
}
}
/**
* Charge depuis la base toutes les adresses d'une societe
*
* @param int $socid Id de la societe a charger en memoire
* @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko
*/
function fetch_lines($socid, $user=0)
{
global $langs, $conf;
$sql = 'SELECT rowid, nom, client, fournisseur';
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe';
$sql .= ' WHERE rowid = '.$socid;
$resqlsoc=$this->db->query($sql);
if ($resqlsoc)
{
if ($this->db->num_rows($resqlsoc))
{
$obj = $this->db->fetch_object($resqlsoc);
$this->socname = $obj->nom;
$this->socid = $obj->rowid;
$this->id = $obj->rowid;
$this->client = $obj->client;
$this->fournisseur = $obj->fournisseur;
}
$this->db->free($resqlsoc);
$this->lines = array();
// Adresses liees a la societe
if ($this->socid)
{
$sql = 'SELECT a.rowid as id, a.label, a.name, a.address, a.datec as dc';
$sql .= ', a.tms as date_update, a.fk_soc';
$sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.phone, a.fax';
$sql .= ', p.code as country_code, p.libelle as country';
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid';
$sql .= ' WHERE a.fk_soc = '.$this->socid;
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$objp = $this->db->fetch_object($resql);
$line = new AddressLine($this->db);
$line->id = $objp->id;
$line->date_creation = $this->db->jdate($objp->dc);
$line->date_update = $this->db->jdate($objp->date_update);
$line->label = $objp->label;
$line->name = $objp->name;
$line->address = $objp->address;
$line->zip = $objp->zip;
$line->town = $objp->town;
$line->country_id = $objp->country_id;
$line->country_code = $objp->country_id?$objp->country_code:'';
$line->country = $objp->country_id?($langs->trans('Country'.$objp->country_code)!='Country'.$objp->country_code?$langs->trans('Country'.$objp->country_code):$objp->country):'';
$line->phone = $objp->phone;
$line->fax = $objp->fax;
$line->note = $objp->note;
$this->lines[$i] = $line;
$i++;
}
$this->db->free($resql);
return $num;
}
else
{
dol_syslog(get_class($this).'::Fetch Erreur: aucune adresse', LOG_ERR);
return 0;
}
}
else
{
dol_syslog(get_class($this).'::Fetch Erreur: societe inconnue', LOG_ERR);
return -1;
}
}
else
{
dol_syslog(get_class($this).'::Fetch '.$this->db->error(), LOG_ERR);
$this->error=$this->db->error();
}
}
/**
* Charge depuis la base l'objet adresse
*
* @param int $id Id de l'adresse a charger en memoire
* @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko
*/
function fetch_address($id, $user=0)
{
global $langs;
global $conf;
$sql = 'SELECT a.rowid, a.fk_soc, a.label, a.name, a.address, a.datec as date_creation';
$sql .= ', a.tms as date_update';
$sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.phone, a.fax';
$sql .= ', p.code as country_code, p.libelle as country';
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid';
$sql .= ' WHERE a.rowid = '.$id;
$resql=$this->db->query($sql);
if ($resql)
{
if ($this->db->num_rows($resql))
{
$obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;
$this->socid = $obj->fk_soc;
$this->date_update = $this->db->jdate($obj->date_update);
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->label = $obj->label;
$this->name = $obj->name;
$this->address = $obj->address;
$this->zip = $obj->zip;
$this->town = $obj->town;
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_id?$obj->country_code:'';
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->trans('Country'.$obj->country_code):$obj->country):'';
$this->phone = $obj->phone;
$this->fax = $obj->fax;
$this->note = $obj->note;
$result = 1;
}
else
{
dol_syslog('Erreur Societe::Fetch aucune adresse avec id='.$this->id.' - '.$sql);
$this->error='Erreur Societe::Fetch aucune adresse avec id='.$this->id.' - '.$sql;
$result = -2;
}
$this->db->free($resql);
}
else
{
dol_syslog('Erreur Societe::Fetch echec sql='.$sql);
dol_syslog('Erreur Societe::Fetch '.$this->db->error());
$this->error=$this->db->error();
$result = -3;
}
return $result;
}
/**
* Suppression d'une adresse
*
* @param int $id id de la societe a supprimer
* @param int $socid id third party
* @return void
*/
function delete($id,$socid)
{
dol_syslog("Address::Delete");
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_address";
$sql.= " WHERE rowid = ".$id;
$sql.= " AND fk_soc = ".$socid;
$result = $this->db->query($sql);
if (!$result)
{
print $this->db->error() . '<br>' . $sql;
}
}
/**
* Return name of address with link (and eventually picto)
* Use $this->id, $this->label, $this->socid
*
* @param int $withpicto Include picto with link
* @param string $option Where the link point to
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option='')
{
global $langs;
$result='';
$lien = '<a href="'.DOL_URL_ROOT.'/comm/address.php?id='.$this->id.'&socid='.$this->socid.'">';
$lienfin='</a>';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label,'address').$lienfin.' ');
$result.=$lien.$this->label.$lienfin;
return $result;
}
/**
* Charge les informations d'ordre info dans l'objet societe
*
* @param int $id id de la societe a charger
* @return void
*/
function info($id)
{
$sql = "SELECT s.rowid, s.nom, datec, datea,";
$sql.= " fk_user_creat, fk_user_modif";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= " WHERE s.rowid = ".$id;
$result=$this->db->query($sql);
if ($result)
{
if ($this->db->num_rows($result))
{
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
if ($obj->fk_user_creat) {
$cuser = new User($this->db);
$cuser->fetch($obj->fk_user_creat);
$this->user_creation = $cuser;
}
if ($obj->fk_user_modif) {
$muser = new User($this->db);
$muser->fetch($obj->fk_user_modif);
$this->user_modification = $muser;
}
$this->ref = $obj->nom;
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_modification = $this->db->jdate($obj->datea);
}
$this->db->free($result);
}
else
{
dol_print_error($this->db);
}
}
}
/**
* \class AddressLine
* \brief Class to manage one address line
*/
class AddressLine
{
var $id;
var $date_creation;
var $date_update;
var $label;
var $name;
var $address;
var $zip;
var $town;
var $country_id;
var $country_code;
var $country;
var $phone;
var $fax;
var $note;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
function __construct($db)
{
$this->db = $db;
}
}
?>