Merge branch 'upstream/develop'
This commit is contained in:
commit
7e1035171c
@ -114,6 +114,7 @@ Fix: [ bug #1240 ] traduction.
|
||||
Fix: [ bug #1238 ] When creating accompte with a %, free product are used for calculation.
|
||||
Fix: [ bug #1280 ] service with not end of date was tagged as expired.
|
||||
Fix: [ bug #1295 ] Error when creating an agenda extrafield with a number as reference
|
||||
New: Added es_CL language
|
||||
|
||||
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||
For users:
|
||||
|
||||
@ -5,6 +5,13 @@ dolibarr (3.6.0-1) unstable; urgency=low
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 8 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 14 March 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
|
||||
@ -30,7 +30,7 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.6.0", "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
return ( "3.6.0", "3.5.2", "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
|
||||
@ -334,5 +334,11 @@ fi
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -562,5 +562,11 @@ fi
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -339,5 +339,11 @@ fi
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -349,5 +349,11 @@ fi
|
||||
* Mon Feb 7 2014 Laurent Destailleur 3.6.0-0.2.b
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -155,7 +155,8 @@ print '<tr '.$bc[$var].'><td width="300"> => price(1234.56)</td><td>'.pric
|
||||
// Timezone
|
||||
$txt =$langs->trans("OSTZ").' (variable system TZ): '.(! empty($_ENV["TZ"])?$_ENV["TZ"]:$langs->trans("NotDefined")).'<br>'."\n";
|
||||
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."<br>\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||
$txt.=$langs->trans("YouCanEditPHPTZ");
|
||||
$txt.=$langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ)?$langs->trans("NotDefined"):$conf->global->MAIN_SERVER_TZ);
|
||||
//$txt.=$langs->trans("YouCanEditPHPTZ"); // deprecated
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
||||
$a=getServerTimeZoneInt('now');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1472,7 +1472,8 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag la facture comme paye completement (close_code non renseigne) ou partiellement (close_code renseigne) + appel trigger BILL_PAYED
|
||||
* Tag la facture comme paye completement (si close_code non renseigne) => this->fk_statut=2, this->paye=1
|
||||
* ou partiellement (si close_code renseigne) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0
|
||||
*
|
||||
* @param User $user Objet utilisateur qui modifie
|
||||
* @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple)
|
||||
@ -1496,6 +1497,7 @@ class Facture extends CommonInvoice
|
||||
if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'";
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1511,8 +1513,7 @@ class Facture extends CommonInvoice
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$this->error=$this->db->error();
|
||||
dol_print_error($this->db);
|
||||
$this->error=$this->db->lasterror();
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -2075,7 +2076,7 @@ class Facture extends CommonInvoice
|
||||
$product=new Product($this->db);
|
||||
$result=$product->fetch($fk_product);
|
||||
$product_type=$product->type;
|
||||
|
||||
|
||||
if($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE && $product_type == 0 && $product->stock_reel < $qty) {
|
||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
||||
$this->db->rollback();
|
||||
|
||||
@ -200,7 +200,12 @@ class Conf
|
||||
}
|
||||
//var_dump($this->modules);
|
||||
//var_dump($this->modules_parts['theme']);
|
||||
|
||||
|
||||
// If you can't set timezone of your PHP, set this constant. Better is to set it to UTC.
|
||||
// In future, this constant will be forced to 'UTC' so PHP server timezone will not have effect anymore.
|
||||
//$this->global->MAIN_SERVER_TZ='Europe/Paris';
|
||||
if (! empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto') date_default_timezone_set($this->global->MAIN_SERVER_TZ);
|
||||
|
||||
// Object $mc
|
||||
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
||||
{
|
||||
|
||||
@ -764,8 +764,9 @@ class FormFile
|
||||
if (empty($relativepath))
|
||||
{
|
||||
$relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/';
|
||||
if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath;
|
||||
if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath;
|
||||
if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath
|
||||
if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath
|
||||
if ($object->element == 'project_task') $relativepath='Call_not_supported_._Call_function_using_a_defined_relative_path_.';
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
@ -1052,9 +1053,10 @@ class FormFile
|
||||
* @param int $permtodelete Deletion is allowed
|
||||
* @param string $action Action
|
||||
* @param string $selected ???
|
||||
* @param string $param More param to add into URL
|
||||
* @return int Number of links
|
||||
*/
|
||||
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null)
|
||||
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='')
|
||||
{
|
||||
global $user, $conf, $langs, $user;
|
||||
global $bc;
|
||||
@ -1071,17 +1073,17 @@ class FormFile
|
||||
$sortfield = null;
|
||||
}
|
||||
$res = $link->fetchAll($links, $object->element, $object->id, $sortfield, $sortorder);
|
||||
$param = (isset($object->id)?'&id=' . $object->id : '');
|
||||
$param .= (isset($object->id)?'&id=' . $object->id : '');
|
||||
|
||||
// Show list of associated links
|
||||
print_titre($langs->trans("LinkedFiles"));
|
||||
|
||||
print '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
|
||||
print '<form action="' . $_SERVER['PHP_SELF'] . ($param?'?'.$param:'') . '" method="POST">';
|
||||
|
||||
print '<table width="100%" class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Documents2"),
|
||||
$langs->trans("Links"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"name",
|
||||
"",
|
||||
@ -1135,34 +1137,34 @@ class FormFile
|
||||
print '<input type="hidden" name="action" value="confirm_updateline">';
|
||||
print $langs->trans('Link') . ': <input type="text" name="link" size="50" value="' . $link->url . '">';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td>';
|
||||
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
|
||||
print '</td>';
|
||||
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right" colspan="2"><input type="submit" name="save" class="button" value="' . $langs->trans('Save') . '">';
|
||||
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans('Cancel') . '">';
|
||||
print '<td align="right" colspan="2">';
|
||||
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
|
||||
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
|
||||
print '</td>';
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
print '<a data-ajax="false" href="'. $link->url . '" target="_blank">';
|
||||
print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
|
||||
print $link->label;
|
||||
print '</a>';
|
||||
print "</td>\n";
|
||||
print '</td>'."\n";
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
|
||||
print '<td align="center"></td>';
|
||||
print '<td align="right" colspan="2">';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id
|
||||
. '&id=' . $object->id . '" class="editfilelink" >' . img_edit().'</a>';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>'; // id= is included into $param
|
||||
if ($permtodelete) {
|
||||
print ' <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id
|
||||
. '&id=' . $object->id . '" class="deletefilelink" >' . img_delete() . '</a>';
|
||||
print ' <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
print "</td>";
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -69,13 +69,11 @@ function get_tz_array()
|
||||
*/
|
||||
function getServerTimeZoneString()
|
||||
{
|
||||
if (function_exists('date_default_timezone_get')) return date_default_timezone_get();
|
||||
else return '';
|
||||
return @date_default_timezone_get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server timezone int.
|
||||
* If $conf->global->MAIN_OLD_DATE is set or PHP too old, we use old behaviour: All convertions does not take care of dayling saving time.
|
||||
*
|
||||
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
|
||||
* @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer)
|
||||
@ -83,7 +81,7 @@ function getServerTimeZoneString()
|
||||
function getServerTimeZoneInt($refgmtdate='now')
|
||||
{
|
||||
global $conf;
|
||||
if (method_exists('DateTimeZone','getOffset') && empty($conf->global->MAIN_OLD_DATE))
|
||||
if (method_exists('DateTimeZone','getOffset'))
|
||||
{
|
||||
// Method 1 (include daylight)
|
||||
$gmtnow=dol_now('gmt'); $yearref=dol_print_date($gmtnow,'%Y'); $monthref=dol_print_date($gmtnow,'%m'); $dayref=dol_print_date($gmtnow,'%d');
|
||||
@ -97,11 +95,13 @@ function getServerTimeZoneInt($refgmtdate='now')
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error('','PHP version must be 5.3+');
|
||||
/*
|
||||
// Method 2 (does not include daylight, not supported by adodb)
|
||||
if ($refgmtdate == 'now')
|
||||
{
|
||||
if (ini_get("date.timezone")=='UTC') return 0;
|
||||
// We don't know server timezone string, so we don't know location, so we can't guess daylight. We assume we use same than client. Fix is to use new PHP with not MAIN_OLD_DATE.
|
||||
// We don't know server timezone string, so we don't know location, so we can't guess daylight. We assume we use same than client but this may be a bug.
|
||||
$gmtnow=dol_now('gmt'); $yearref=dol_print_date($gmtnow,'%Y'); $monthref=dol_print_date($gmtnow,'%m'); $dayref=dol_print_date($gmtnow,'%d');
|
||||
if (dol_stringtotime($_SESSION['dol_dst_first']) <= $gmtnow && $gmtnow < dol_stringtotime($_SESSION['dol_dst_second'])) $daylight=1;
|
||||
else $daylight=0;
|
||||
@ -111,7 +111,7 @@ function getServerTimeZoneInt($refgmtdate='now')
|
||||
elseif ($refgmtdate == 'summer')
|
||||
{
|
||||
if (ini_get("date.timezone")=='UTC') return 0;
|
||||
// We don't know server timezone string, so we don't know location, so we can't guess daylight. We assume we use same than client. Fix is to use new PHP with not MAIN_OLD_DATE.
|
||||
// We don't know server timezone string, so we don't know location, so we can't guess daylight. We assume we use same than client but this may be a bug.
|
||||
$gmtnow=dol_now('gmt'); $yearref=dol_print_date($gmtnow,'%Y'); $monthref='08'; $dayref='01';
|
||||
if (dol_stringtotime($_SESSION['dol_dst_first']) <= dol_stringtotime($yearref.'-'.$monthref.'-'.$dayref) && dol_stringtotime($yearref.'-'.$monthref.'-'.$dayref) < dol_stringtotime($_SESSION['dol_dst_second'])) $daylight=1;
|
||||
else $daylight=0;
|
||||
@ -119,49 +119,12 @@ function getServerTimeZoneInt($refgmtdate='now')
|
||||
return 'unknown'; // For true result
|
||||
}
|
||||
else $tmp=dol_mktime(0,0,0,1,1,1970);
|
||||
*/
|
||||
}
|
||||
$tz=round(($tmp<0?1:-1)*abs($tmp/3600));
|
||||
return $tz;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server timezone string
|
||||
*
|
||||
* @return string Parent company timezone string ('Europe/Paris')
|
||||
*
|
||||
function getParentCompanyTimeZoneString()
|
||||
{
|
||||
if (function_exists('date_default_timezone_get')) return date_default_timezone_get();
|
||||
else return '';
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return parent company timezone int.
|
||||
* If $conf->global->MAIN_NEW_DATE is set, we use new behaviour: All convertions take care of dayling saving time.
|
||||
*
|
||||
* @param string $refgmtdate Reference date for timezone (timezone differs on winter and summer)
|
||||
* @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer)
|
||||
*
|
||||
function getParentCompanyTimeZoneInt($refgmtdate='now')
|
||||
{
|
||||
global $conf;
|
||||
if (class_exists('DateTime') && empty($conf->global->MAIN_OLD_DATE))
|
||||
{
|
||||
// Method 1 (include daylight)
|
||||
$localtz = new DateTimeZone(getParentCompanyTimeZoneString());
|
||||
$localdt = new DateTime($refgmtdate, $localtz);
|
||||
$tmp=-1*$localtz->getOffset($localdt);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Method 2 (does not include daylight)
|
||||
$tmp=dol_mktime(0,0,0,1,1,1970);
|
||||
}
|
||||
$tz=($tmp<0?1:-1)*abs($tmp/3600);
|
||||
return $tz;
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
* Add a delay to a date
|
||||
@ -476,7 +439,7 @@ function dol_get_next_week($day, $week, $month, $year)
|
||||
*
|
||||
* @param int $year Year
|
||||
* @param int $month Month
|
||||
* @param boolean $gm False = Return date to compare with server TZ, True to compare with GM date.
|
||||
* @param mixed $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
|
||||
* Exemple: dol_get_first_day(1970,1,false) will return -3600 with TZ+1, after a dol_print_date will return 1970-01-01 00:00:00
|
||||
* Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, after a dol_print_date will return 1970-01-01 00:00:00
|
||||
* @return timestamp Date for first day
|
||||
@ -491,7 +454,7 @@ function dol_get_first_day($year,$month=1,$gm=false)
|
||||
*
|
||||
* @param int $year Year
|
||||
* @param int $month Month
|
||||
* @param boolean $gm False = Return date to compare with server TZ, True to compare with GM date.
|
||||
* @param boolean $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
|
||||
* @return timestamp Date for first day
|
||||
*/
|
||||
function dol_get_last_day($year,$month=12,$gm=false)
|
||||
@ -518,7 +481,7 @@ function dol_get_last_day($year,$month=12,$gm=false)
|
||||
* @param int $day Day
|
||||
* @param int $month Month
|
||||
* @param int $year Year
|
||||
* @param int $gm False = Return date to compare with server TZ, True to compare with GM date.
|
||||
* @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
|
||||
* @return array year,month, week,first_day,prev_year,prev_month,prev_day
|
||||
*/
|
||||
function dol_get_first_day_week($day,$month,$year,$gm=false)
|
||||
|
||||
@ -997,7 +997,7 @@ function dol_getdate($timestamp,$fast=false)
|
||||
* @param int $month Month (1 to 12)
|
||||
* @param int $day Day (1 to 31)
|
||||
* @param int $year Year
|
||||
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||
* @param mixed $gm True or 1 or 'gmt'=Input informations are GMT values, False or 0 or 'server' = local to server TZ, 'user' = local to user TZ
|
||||
* @param int $check 0=No check on parameters (Can use day 32, etc...)
|
||||
* @return int Date as a timestamp, '' if error
|
||||
* @see dol_print_date, dol_stringtotime, dol_getdate
|
||||
@ -1023,17 +1023,28 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
if ($second< 0 || $second > 60) return '';
|
||||
}
|
||||
|
||||
if (method_exists('DateTime','getTimestamp') && empty($conf->global->MAIN_OLD_DATE))
|
||||
if (method_exists('DateTime','getTimestamp'))
|
||||
{
|
||||
if (empty($gm)) $localtz = new DateTimeZone(date_default_timezone_get());
|
||||
if (empty($gm) || $gm === 'server')
|
||||
{
|
||||
$default_timezone=@date_default_timezone_get();
|
||||
$localtz = new DateTimeZone($default_timezone);
|
||||
}
|
||||
else if ($gm === 'user')
|
||||
{
|
||||
$default_timezone=(empty($_SESSION["dol_tz_string"])?'UTC':$_SESSION["dol_tz_string"]);
|
||||
$localtz = new DateTimeZone($default_timezone);
|
||||
}
|
||||
else $localtz = new DateTimeZone('UTC');
|
||||
$dt = new DateTime(null,$localtz);
|
||||
$dt->setDate($year,$month,$day);
|
||||
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
||||
$date=$dt->getTimestamp();
|
||||
$date=$dt->getTimestamp(); // should include daylight saving time
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error('','PHP version must be 5.3+');
|
||||
/*
|
||||
$usealternatemethod=false;
|
||||
if ($year <= 1970) $usealternatemethod=true; // <= 1970
|
||||
if ($year >= 2038) $usealternatemethod=true; // >= 2038
|
||||
@ -1045,7 +1056,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
else
|
||||
{
|
||||
$date=mktime($hour,$minute,$second,$month,$day,$year);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
return $date;
|
||||
}
|
||||
@ -2223,10 +2234,10 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0)
|
||||
|
||||
if ($infoonimgalt)
|
||||
{
|
||||
return img_picto($text, 'star', 'class="hideonsmartphone"');
|
||||
return img_picto($text, 'info', 'class="hideonsmartphone"');
|
||||
}
|
||||
|
||||
return ($nodiv?'':'<div class="info hideonsmartphone">').img_picto($langs->trans('InfoAdmin'), 'star', 'class="hideonsmartphone"').' '.$text.($nodiv?'':'</div>');
|
||||
return ($nodiv?'':'<div class="info hideonsmartphone">').img_picto($langs->trans('InfoAdmin'), 'info', 'class="hideonsmartphone"').' '.$text.($nodiv?'':'</div>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -109,7 +109,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - 16; // width of images
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
@ -153,7 +153,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
|
||||
if ($conf->commande->dir_output)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
@ -228,6 +228,15 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -316,7 +325,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -412,6 +421,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
@ -601,7 +611,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$text=$outputlangs->transnoentities("DeliveryDate").':';
|
||||
$pdf->MultiCell(80, 3, $text, 0, 'L', 0);
|
||||
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$text=dol_print_date($object->date_livraison,'day','',$outputlangs);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -109,7 +109,7 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - 16; // width of images
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
@ -227,6 +227,15 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -315,7 +324,7 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -411,6 +420,7 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -116,15 +116,24 @@ class pdf_strato extends ModelePDFContract
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("contracts");
|
||||
$outputlangs->load("interventions");
|
||||
|
||||
if ($conf->contrat->dir_output)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->contrat->dir_output;
|
||||
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
||||
$file = $dir . "/" . $objectref . ".pdf";
|
||||
// Definition of $dir and $file
|
||||
if ($object->specimen)
|
||||
{
|
||||
$dir = $conf->contrat->dir_output;
|
||||
$file = $dir . "/SPECIMEN.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->contrat->dir_output . "/" . $objectref;
|
||||
$file = $dir . "/" . $objectref . ".pdf";
|
||||
}
|
||||
|
||||
if (! file_exists($dir))
|
||||
{
|
||||
|
||||
@ -267,6 +267,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
@ -474,7 +475,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
else
|
||||
{
|
||||
$text=$this->emetteur->name;
|
||||
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
$pdf->MultiCell(70, 3, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
}
|
||||
|
||||
//*********************Entete****************************
|
||||
|
||||
@ -240,7 +240,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pageposbefore=$pdf->getPage();
|
||||
|
||||
// Description de la ligne produit
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,150,3,$this->posxdesc,$curY,0,1);
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxqtyordered-10,3,$this->posxdesc,$curY,0,1);
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter=$pdf->getPage();
|
||||
@ -264,6 +264,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -109,7 +109,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - 16; // width of images
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
@ -228,6 +228,15 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -318,7 +327,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -413,6 +422,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -250,7 +250,7 @@ class ImportCsv extends ModeleImports
|
||||
/**
|
||||
* Return array of next record in input file.
|
||||
*
|
||||
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string)
|
||||
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
|
||||
*/
|
||||
function import_read_record()
|
||||
{
|
||||
@ -403,7 +403,7 @@ class ImportCsv extends ModeleImports
|
||||
{
|
||||
// Set $newval with value to insert and set $listvalues with sql request part for insert
|
||||
$newval='';
|
||||
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field is not null or '' but string
|
||||
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value
|
||||
|
||||
// Make some tests on $newval
|
||||
|
||||
@ -461,41 +461,46 @@ class ImportCsv extends ModeleImports
|
||||
{
|
||||
if (empty($newval)) $newval='0';
|
||||
}
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomercodeifnull')
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomercodeifauto')
|
||||
{
|
||||
if (empty($newval) || $newval=='auto')
|
||||
if (strtolower($newval) == 'auto')
|
||||
{
|
||||
$this->thirpartyobject->get_codeclient(0,0);
|
||||
$newval=$this->thirpartyobject->code_client;
|
||||
//print 'code_client='.$newval;
|
||||
}
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
}
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsuppliercodeifnull')
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsuppliercodeifauto')
|
||||
{
|
||||
if (empty($newval) || $newval=='auto')
|
||||
if (strtolower($newval) == 'auto')
|
||||
{
|
||||
$newval=$this->thirpartyobject->get_codefournisseur(0,1);
|
||||
$newval=$this->thirpartyobject->code_fournisseur;
|
||||
//print 'code_fournisseur='.$newval;
|
||||
}
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
}
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomeraccountancycodeifnull')
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomeraccountancycodeifauto')
|
||||
{
|
||||
if (empty($newval) || $newval=='auto')
|
||||
if (strtolower($newval) == 'auto')
|
||||
{
|
||||
$this->thirpartyobject->get_codecompta('customer');
|
||||
$newval=$this->thirpartyobject->code_compta;
|
||||
//print 'code_compta='.$newval;
|
||||
}
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
}
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsupplieraccountancycodeifnull')
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsupplieraccountancycodeifauto')
|
||||
{
|
||||
if (empty($newval) || $newval=='auto')
|
||||
if (strtolower($newval) == 'auto')
|
||||
{
|
||||
$this->thirpartyobject->get_codecompta('supplier');
|
||||
$newval=$this->thirpartyobject->code_compta_fournisseur;
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
//print 'code_compta_fournisseur='.$newval;
|
||||
}
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
}
|
||||
|
||||
//print 'Val to use as insert is '.$newval.'<br>';
|
||||
@ -560,6 +565,7 @@ class ImportCsv extends ModeleImports
|
||||
if ($listfields) { $listfields.=', '; $listvalues.=', '; }
|
||||
$listfields.=$fieldname;
|
||||
|
||||
// Note: arrayrecord (and 'type') is filled with ->import_read_record called by import.php page before calling import_insert
|
||||
if (empty($newval) && $arrayrecord[($key-1)]['type'] < 0) $listvalues.=($newval=='0'?$newval:"null");
|
||||
elseif (empty($newval) && $arrayrecord[($key-1)]['type'] == 0) $listvalues.="''";
|
||||
else $listvalues.="'".$this->db->escape($newval)."'";
|
||||
@ -664,4 +670,5 @@ function cleansep($value)
|
||||
return str_replace(array(',',';'),'/',$value);
|
||||
};
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2008 Chiptronik
|
||||
@ -223,15 +223,24 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
/*
|
||||
// Positionne $this->atleastonediscount si on a au moins une remise
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// Positionne $this->atleastonediscount si on a au moins une remise
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
*/
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -307,7 +316,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -370,6 +379,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -401,14 +401,14 @@ class modSociete extends DolibarrModules
|
||||
's.fk_typent'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ctypent.class.php','class'=>'Ctypent','method'=>'fetch','dict'=>'DictionaryCompanyType'),
|
||||
's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cpays.class.php','class'=>'Cpays','method'=>'fetch','dict'=>'DictionaryCountry'),
|
||||
's.fk_stcomm'=>array('rule'=>'zeroifnull'),
|
||||
's.code_client'=>array('rule'=>'getcustomercodeifnull'),
|
||||
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifnull'),
|
||||
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifnull'),
|
||||
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifnull')
|
||||
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
|
||||
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
|
||||
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
|
||||
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto')
|
||||
);
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
|
||||
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.zip'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.phone'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note_private'=>"This is an example of private note for record",'s.note_public'=>"This is an example of public note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789');
|
||||
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or empty or 'auto'",'s.code_fournisseur'=>"SU01-0001 or empty or 'auto'",'s.address'=>"61 jump street",'s.zip'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.phone'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note_private'=>"This is an example of private note for record",'s.note_public'=>"This is an example of public note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789');
|
||||
|
||||
// Import list of contact and attributes
|
||||
$r++;
|
||||
|
||||
@ -222,12 +222,15 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->MultiCell(20, 3, $dateend, 0, 'L');
|
||||
|
||||
|
||||
$pageposafter=$pdf->getPage();
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -254,6 +254,15 @@ class pdf_azur extends ModelePDFPropales
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -332,7 +341,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposbefore+1);
|
||||
|
||||
$curY = $tab_top_newpage;
|
||||
$showpricebeforepagebreak=0;
|
||||
@ -370,7 +379,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -387,6 +396,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter=$pdf->getPage();
|
||||
|
||||
$pdf->setPage($pageposbefore);
|
||||
$pdf->setTopMargin($this->marge_haute);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
@ -468,6 +478,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@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
|
||||
@ -58,7 +58,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Societe $object Supplier invoice
|
||||
* @param Object $object Supplier invoice
|
||||
*/
|
||||
function __construct($db,$object)
|
||||
{
|
||||
@ -105,7 +105,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - 16; // width of images
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
@ -227,6 +227,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -281,7 +290,39 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
// Description of product line
|
||||
$curX = $this->posxdesc-1;
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,1);
|
||||
$showpricebeforepagebreak=1;
|
||||
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,1);
|
||||
$pageposafter=$pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
$pdf->rollbackTransaction(true);
|
||||
$pageposafter=$pageposbefore;
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
||||
$posyafter=$pdf->GetY();
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||
{
|
||||
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page
|
||||
{
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We found a page break
|
||||
$showpricebeforepagebreak=0;
|
||||
}
|
||||
}
|
||||
else // No pagebreak
|
||||
{
|
||||
$pdf->commitTransaction();
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter=$pdf->getPage();
|
||||
@ -290,7 +331,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
|
||||
// We suppose that a too long description is moved completely on next page
|
||||
if ($pageposafter > $pageposbefore) {
|
||||
if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
|
||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||
}
|
||||
|
||||
@ -301,7 +342,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R');
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Unit price before discount
|
||||
@ -322,7 +363,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
// Total HT line
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
$tvaligne=$object->lines[$i]->total_tva;
|
||||
@ -344,6 +385,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
@ -368,6 +410,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
|
||||
{
|
||||
@ -384,6 +427,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->AddPage();
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -110,7 +110,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->posxdiscount=162;
|
||||
$this->postotalht=174;
|
||||
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - 16; // width of images
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
@ -235,6 +235,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount))
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxup+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxqty+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
|
||||
//$this->postotalht;
|
||||
}
|
||||
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
@ -309,7 +318,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pagenb+1);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -403,6 +412,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
$pdf->setPage($pageposafter);
|
||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
|
||||
//$pdf->SetDrawColor(190,190,200);
|
||||
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@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
|
||||
@ -18,16 +18,17 @@
|
||||
*/
|
||||
|
||||
$langs->load("link");
|
||||
if (empty($relativepathwithnofile)) $relativepathwithnofile='';
|
||||
|
||||
/*
|
||||
* Confirm suppression
|
||||
* Confirm form to delete
|
||||
*/
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
|
||||
$ret = $form->form_confirm(
|
||||
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'),
|
||||
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'),
|
||||
'confirm_deletefile',
|
||||
@ -58,11 +59,11 @@ $formfile->list_of_documents(
|
||||
$modulepart,
|
||||
$param,
|
||||
0,
|
||||
'',
|
||||
$relativepathwithnofile, // relative path with no file. For example "moduledir/0/1"
|
||||
$permission
|
||||
);
|
||||
|
||||
print "<br>";
|
||||
//List of links
|
||||
$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'));
|
||||
$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'), $param);
|
||||
print "<br>";
|
||||
|
||||
@ -74,7 +74,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
||||
}
|
||||
}
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.($withproject?'&withproject=1':''));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,8 +212,9 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('addline_predefined') && (! GETPOST('pu') || GETPOST('pu')=='')) // Unit price can be 0 but not ''
|
||||
if (! GETPOST('addline_predefined') && ( GETPOST('pu')==='')) // Unit price can be 0 but not ''
|
||||
{
|
||||
|
||||
setEventMessage($langs->trans($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('UnitPrice'))), 'errors');
|
||||
$error++;
|
||||
}
|
||||
@ -232,7 +233,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
if (GETPOST('addline_predefined') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
if ((GETPOST('addline_predefined') || GETPOST('idprodfournprice')) && ( GETPOST('pu')!=='')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
{
|
||||
$idprod=0;
|
||||
$productsupplier = new ProductFournisseur($db);
|
||||
@ -292,7 +293,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
else if( GETPOST('pu')!=='' || GETPOST('amountttc')!=='' )
|
||||
{
|
||||
$type=$_POST["type"];
|
||||
$desc=$_POST['dp_desc'];
|
||||
@ -319,7 +320,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
$ttc = price2num($_POST['amountttc']);
|
||||
$ht = $ttc / (1 + ($tauxtva / 100));
|
||||
$price_base_type = 'HT';
|
||||
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type);
|
||||
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1043,7 +1043,7 @@ else
|
||||
$idGroupValid = $cp->getConfCP('userGroup');
|
||||
|
||||
$validator = new UserGroup($db,$idGroupValid);
|
||||
$valideur = $validator->listUsersForGroup();
|
||||
$valideur = $validator->listUsersForGroup('',1);
|
||||
|
||||
print '<td>';
|
||||
$form->select_users($cp->fk_validator,"valideur",1,"",0,$valideur,'');
|
||||
|
||||
@ -482,7 +482,7 @@ if ($step == 3 && $datatoimport)
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
@ -1307,7 +1307,10 @@ if ($step == 5 && $datatoimport)
|
||||
$result=$obj->import_open_file($pathfile,$langs);
|
||||
if ($result > 0)
|
||||
{
|
||||
$sourcelinenb=0; $endoffile=0;
|
||||
global $tablewithentity_cache;
|
||||
$tablewithentity_cache=array();
|
||||
$sourcelinenb=0; $endoffile=0;
|
||||
|
||||
// Loop on each input file record
|
||||
while ($sourcelinenb < $nboflines && ! $endoffile)
|
||||
{
|
||||
@ -1621,7 +1624,10 @@ if ($step == 6 && $datatoimport)
|
||||
$result=$obj->import_open_file($pathfile,$langs);
|
||||
if ($result > 0)
|
||||
{
|
||||
global $tablewithentity_cache;
|
||||
$tablewithentity_cache=array();
|
||||
$sourcelinenb=0; $endoffile=0;
|
||||
|
||||
while ($sourcelinenb < $nboflines && ! $endoffile)
|
||||
{
|
||||
$sourcelinenb++;
|
||||
|
||||
@ -73,12 +73,12 @@ if (! empty($useragent))
|
||||
if (versioncompare(versionphparray(),array(4,3,10)) < 0) // Minimum to use (error if lower)
|
||||
{
|
||||
print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'4.3.10');
|
||||
$checksok=0;
|
||||
$checksok=0; // 0=error, 1=warning
|
||||
}
|
||||
else if (versioncompare(versionphparray(),array(5,2,0)) < 0) // Minimum supported (warning if lower)
|
||||
else if (versioncompare(versionphparray(),array(5,3,0)) < 0) // Minimum supported (error if lower)
|
||||
{
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("WarningPHPVersionTooLow",'5.2.0');
|
||||
$checksok=1;
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'5.3.0');
|
||||
$checksok=0; // 0=error, 1=warning
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -8,7 +8,6 @@ BillsCustomersUnpaid=Unpaid customer's invoices
|
||||
BillsCustomersUnpaidForCompany=Unpaid customer's invoices for %s
|
||||
BillsSuppliersUnpaid=Unpaid supplier's invoices
|
||||
BillsSuppliersUnpaidForCompany=Unpaid supplier's invoices for %s
|
||||
BillsUnpaid=Unpaid
|
||||
BillsLate=Late payments
|
||||
BillsStatistics=Customer's invoices statistics
|
||||
BillsStatisticsSuppliers=Supplier's invoices statistics
|
||||
@ -24,7 +23,7 @@ InvoiceProFormaAsk=Proforma invoice
|
||||
InvoiceProFormaDesc=<b>Proforma invoice</b> is an image of a true invoice but has no accountancy value.
|
||||
InvoiceReplacement=Replacement invoice
|
||||
InvoiceReplacementAsk=Replacement invoice for invoice
|
||||
InvoiceReplacementDesc=<b>Replacement invoice</b> is used to cancel and replace completely an invoice with no payment already received.<br><br>Note: Only invoice with no payment on it can be replaced. If not closed, it will be automatically closed to 'abandoned'.
|
||||
InvoiceReplacementDesc=<b>Replacement invoice</b> is used to cancel and replace completely an invoice with no payment already received.<br><br>Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'.
|
||||
InvoiceAvoir=Credit note
|
||||
InvoiceAvoirAsk=Credit note to correct invoice
|
||||
InvoiceAvoirDesc=The <b>credit note</b> is a negative invoice used to solve fact that an invoice has an amount that differs than amount really paid (because customer paid too much by error, or will not paid completely since he returned some products for example).
|
||||
@ -217,7 +216,6 @@ DateEcheance=Due date limit
|
||||
DateInvoice=Invoice date
|
||||
NoInvoice=No invoice
|
||||
ClassifyBill=Classify invoice
|
||||
NoSupplierBillsUnpaid=No suppliers invoices unpaid
|
||||
SupplierBillsToPay=Suppliers invoices to pay
|
||||
CustomerBillsUnpaid=Unpaid customers invoices
|
||||
DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters
|
||||
@ -399,6 +397,11 @@ ToMakePaymentBack=Pay back
|
||||
ListOfYourUnpaidInvoices=List of unpaid invoices
|
||||
NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative.
|
||||
RevenueStamp=Revenue stamp
|
||||
YouMustCreateInvoiceFromThird=This option is only available when creating invoice from tab "customer" of thirdparty
|
||||
PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template)
|
||||
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
||||
##### Types de contacts #####
|
||||
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice
|
||||
TypeContact_facture_external_BILLING=Customer invoice contact
|
||||
@ -408,11 +411,3 @@ TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up s
|
||||
TypeContact_invoice_supplier_external_BILLING=Supplier invoice contact
|
||||
TypeContact_invoice_supplier_external_SHIPPING=Supplier shipping contact
|
||||
TypeContact_invoice_supplier_external_SERVICE=Supplier service contact
|
||||
# crabe PDF Model
|
||||
PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template)
|
||||
# oursin PDF Model
|
||||
PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (alternative Template)
|
||||
# NumRef Modules
|
||||
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
||||
|
||||
@ -20,6 +20,7 @@ Language_en_US=English (United States)
|
||||
Language_en_ZA=English (South Africa)
|
||||
Language_es_ES=Spanish
|
||||
Language_es_AR=Spanish (Argentina)
|
||||
Language_es_CL=Spanish (Chile)
|
||||
Language_es_HN=Spanish (Honduras)
|
||||
Language_es_MX=Spanish (Mexico)
|
||||
Language_es_PY=Spanish (Paraguay)
|
||||
|
||||
@ -18,12 +18,11 @@ MarginDetails=Margin details
|
||||
|
||||
ProductMargins=Product margins
|
||||
CustomerMargins=Customer margins
|
||||
AgentMargins=Agent margins
|
||||
SalesRepresentativeMargins=Sales representative margins
|
||||
|
||||
ProductService=Product or Service
|
||||
AllProducts=All products and services
|
||||
ChooseProduct/Service=Choose product or service
|
||||
CommercialAgent=Commercial agent
|
||||
|
||||
StartDate=Start date
|
||||
EndDate=End date
|
||||
|
||||
23
htdocs/langs/es_CL/admin.lang
Normal file
23
htdocs/langs/es_CL/admin.lang
Normal file
@ -0,0 +1,23 @@
|
||||
Module20Name=Cotizaciones
|
||||
Module20Desc=Gestión de cotizaciones/propuestas comerciales
|
||||
Permission21=Consultar cotizaciones
|
||||
Permission22=Crear/modificar cotizaciones
|
||||
Permission24=Validar cotizaciones
|
||||
Permission25=Enviar las cotizaciones
|
||||
Permission26=Cerrar cotizaciones
|
||||
Permission27=Eliminar cotizaciones
|
||||
Permission28=Exportar las cotizaciones
|
||||
DictionnarySource=Orígenes de cotizaciones/pedidos
|
||||
VATIsUsedDesc=El tipo de IVA propuesto por defecto en las creaciones de cotizaciones, facturas, pedidos, etc. Responde a la siguiente regla:<br>Si el vendedor no está sujeto a IVA, IVA por defecto=0. Final de regla.<br>Si el país del vendedor= país del comprador entonces IVA por defecto=IVA del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y el bien vendido= nuevo medio de transportes (auto, barco, avión), IVA por defecto=0 (el IVA debe ser pagado por comprador a la hacienda pública de su país y no al vendedor). Final de regla<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= particular o empresa sin NIF intracomunitario entonces IVA por defecto=IVA del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= empresa con NIF intracomunitario entonces IVA por defecto=0. Final de regla.<br>Si no, IVA propuesto por defecto=0. Final de regla.<br>
|
||||
VATIsNotUsedDesc=El tipo de IVA propuesto por defecto es 0. Este es el caso de asociaciones, particulares o algunas pequeñas sociedades.
|
||||
VATIsUsedExampleFR=En Francia, se trata de las sociedades u organismos que eligen un régimen fiscal general (General simplificado o General normal), régimen en el cual se declara el IVA.
|
||||
Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Tolerancia de retraso antes de la alerta (en días) sobre cotizaciones a cerrar
|
||||
Delays_MAIN_DELAY_PROPALS_TO_BILL=Tolerancia de retraso antes de la alerta (en días) sobre cotizaciones no facturadas
|
||||
WebCalAddEventOnStatusPropal=Añadir evento en el calendario en el cambio de estado de las cotizaciones
|
||||
PropalSetup=Configuración del módulo Cotizaciones
|
||||
ProposalsNumberingModules=Módulos de numeración de cotizaciones
|
||||
ProposalsPDFModules=Modelos de documentos de cotizaciones
|
||||
HideTreadedPropal=Ocultar las cotizaciones procesados del listado
|
||||
FreeLegalTextOnProposal=Texto libre en cotizaciones
|
||||
WatermarkOnDraftProposal=Marca de agua en cotizaciones borrador (en caso de estar vacío)
|
||||
FCKeditorForProductDetails=Creación/edición WYSIWIG de las líneas de detalle de los productos (en pedidos, cotizaciones, facturas, etc.)
|
||||
2
htdocs/langs/es_CL/agenda.lang
Normal file
2
htdocs/langs/es_CL/agenda.lang
Normal file
@ -0,0 +1,2 @@
|
||||
PropalValidatedInDolibarr=Cotización %s validada
|
||||
ProposalSentByEMail=Cotización %s enviada por e-mail
|
||||
1
htdocs/langs/es_CL/bills.lang
Normal file
1
htdocs/langs/es_CL/bills.lang
Normal file
@ -0,0 +1 @@
|
||||
RelatedCommercialProposals=Cotizaciones asociadas
|
||||
5
htdocs/langs/es_CL/boxes.lang
Normal file
5
htdocs/langs/es_CL/boxes.lang
Normal file
@ -0,0 +1,5 @@
|
||||
BoxLastProposals=Últimas cotizaciones
|
||||
BoxTitleLastPropals=Las %s últimas cotizaciones registradas
|
||||
NoRecordedProposals=Sin cotizaciones registradas
|
||||
BoxProposalsPerMonth=Cotizaciones por mes
|
||||
ForProposals=Cotizaciones
|
||||
4
htdocs/langs/es_CL/commercial.lang
Normal file
4
htdocs/langs/es_CL/commercial.lang
Normal file
@ -0,0 +1,4 @@
|
||||
SendPropalRef=Envío de la cotización %s
|
||||
ActionAC_PROP=Envío cotización por correo
|
||||
DraftPropals=Cotizaciones borrador
|
||||
SearchPropal=Buscar una cotización
|
||||
2
htdocs/langs/es_CL/companies.lang
Normal file
2
htdocs/langs/es_CL/companies.lang
Normal file
@ -0,0 +1,2 @@
|
||||
ContactForProposals=Contacto de cotizaciones
|
||||
NoContactForAnyProposal=Este contacto no es contacto de ninguna cotización
|
||||
1
htdocs/langs/es_CL/compta.lang
Normal file
1
htdocs/langs/es_CL/compta.lang
Normal file
@ -0,0 +1 @@
|
||||
ProposalStats=Estadísticas de cotizaciones
|
||||
2
htdocs/langs/es_CL/ecm.lang
Normal file
2
htdocs/langs/es_CL/ecm.lang
Normal file
@ -0,0 +1,2 @@
|
||||
DocsProposals=Documentos cotizaciones
|
||||
ECMDocsByProposals=Documentos asociados a cotizaciones
|
||||
1
htdocs/langs/es_CL/install.lang
Normal file
1
htdocs/langs/es_CL/install.lang
Normal file
@ -0,0 +1 @@
|
||||
MigrationProposal=Migración de datos de cotizaciones
|
||||
1
htdocs/langs/es_CL/main.lang
Normal file
1
htdocs/langs/es_CL/main.lang
Normal file
@ -0,0 +1 @@
|
||||
CommercialProposalsShort=Cotizaciones
|
||||
1
htdocs/langs/es_CL/members.lang
Normal file
1
htdocs/langs/es_CL/members.lang
Normal file
@ -0,0 +1 @@
|
||||
TurnoverOrBudget=Volumen de ventas (empresa) o Cotización (asociación o colectivo)
|
||||
1
htdocs/langs/es_CL/orders.lang
Normal file
1
htdocs/langs/es_CL/orders.lang
Normal file
@ -0,0 +1 @@
|
||||
OrderSource0=Cotización
|
||||
9
htdocs/langs/es_CL/other.lang
Normal file
9
htdocs/langs/es_CL/other.lang
Normal file
@ -0,0 +1,9 @@
|
||||
Notify_PROPAL_VALIDATE=Validación cotización cliente
|
||||
Notify_PROPAL_SENTBYMAIL=Envío cotización por e-mail
|
||||
PredefinedMailContentSendProposal=Buenos días, __CONTACTCIVNAME__ \n\n Nos ponemos en contacto con usted para facilitarle la cotización __PROPREF__\n\n Ante cualquier duda, consúltenos y será atendido a la mayor brevedad posible.\n\n __PERSONALIZED__Cordialmente\n\n__SIGNATURE__
|
||||
NumberOfProposals=Número de cotizaciones en los últimos 12 meses
|
||||
NumberOfUnitsProposals=Número de unidades en las cotizaciones en los últimos 12 meses
|
||||
EMailTextProposalValidated=La cotización %s que le concierne ha sido validado.
|
||||
PropalClosedSignedInDolibarr=Cotización %s firmada en Dolibarr
|
||||
PropalClosedRefusedInDolibarr=Cotización %s rechazada en Dolibarr
|
||||
PropalValidatedInDolibarr=Cotización %s validada en Dolibarr
|
||||
3
htdocs/langs/es_CL/products.lang
Normal file
3
htdocs/langs/es_CL/products.lang
Normal file
@ -0,0 +1,3 @@
|
||||
AddToMyProposals=Añadir a mis cotizaciones
|
||||
AddToOtherProposals=Añadir a otras cotizaciones
|
||||
NoteNotVisibleOnBill=Nota (no visible en las facturas, cotizaciones, etc.)
|
||||
1
htdocs/langs/es_CL/projects.lang
Normal file
1
htdocs/langs/es_CL/projects.lang
Normal file
@ -0,0 +1 @@
|
||||
ListProposalsAssociatedProject=Listado de cotizaciones asociadas al proyecto
|
||||
62
htdocs/langs/es_CL/propal.lang
Normal file
62
htdocs/langs/es_CL/propal.lang
Normal file
@ -0,0 +1,62 @@
|
||||
Proposals=Cotizaciones
|
||||
Proposal=Cotización
|
||||
ProposalShort=Cotización
|
||||
ProposalsDraft=Cotizaciones borrador
|
||||
ProposalDraft=Cotización borrador
|
||||
ProposalsOpened=Cotizaciones abiertas
|
||||
Prop=Cotizaciones
|
||||
CommercialProposal=Cotización
|
||||
CommercialProposals=Cotizaciones
|
||||
ProposalCard=Ficha cotización
|
||||
NewProp=Nueva cotización
|
||||
NewProposal=Nueva cotización
|
||||
NewPropal=Nueva cotización
|
||||
DeletePop=Eliminar cotización
|
||||
ValidateProp=Validar cotización
|
||||
AddProp=Crear cotización
|
||||
ConfirmDeleteProp=¿Está seguro de querer eliminar esta cotización?
|
||||
ConfirmValidateProp=¿Está seguro de querer validar esta cotización bajo la referencia <b>%s</b> ?
|
||||
LastClosedProposals=Las %s últimas cotizaciones cerradas
|
||||
LastModifiedProposals=Las %s últimas cotizaciones modificadas
|
||||
AllPropals=Todas las cotizacioness
|
||||
LastProposals=Últimas cotizaciones
|
||||
SearchAProposal=Buscar una cotización
|
||||
ProposalsStatistics=Estadísticas de cotizaciones
|
||||
NumberOfUnitsProposals=Número de unidades en las cotizaciones en los últimos 12 meses
|
||||
NbOfProposals=Número cotizaciones
|
||||
ShowPropal=Ver cotización
|
||||
PropalStatusValidated=Validado (cotización abierta)
|
||||
PropalStatusOpened=Validado (cotización abierta)
|
||||
PropalsToClose=Cotizaciones a cerrar
|
||||
PropalsToBill=Cotizaciones firmadas a facturar
|
||||
ListOfProposals=Listado de cotizaciones
|
||||
ActionsOnPropal=Eventos sobre la cotización
|
||||
NoOpenedPropals=Sin cotizaciones abiertos
|
||||
NoOtherOpenedPropals=Ninguna otra cotización abierta
|
||||
RefProposal=Ref. cotización
|
||||
SendPropalByMail=Enviar cotización por e-mail
|
||||
AssociatedDocuments=Documentos asociados a la cotizacion
|
||||
DatePropal=Fecha cotización
|
||||
ErrorPropalNotFound=Presupuesto %s inexistente
|
||||
Estimate=Cotización:
|
||||
EstimateShort=Cotización
|
||||
OtherPropals=Otras cotizaciones
|
||||
AddToDraftProposals=Añadir a cotización borrador
|
||||
NoDraftProposals=Sin cotizaciones borrador
|
||||
CopyPropalFrom=Crear cotización por copia de una existente
|
||||
CreateEmptyPropal=Crear cotización vacía
|
||||
UseCustomerContactAsPropalRecipientIfExist=Utilizar dirección contacto de seguimiento de cliente definido en vez de la dirección del tercero como destinatario de las cotizaciones
|
||||
ClonePropal=Clonar cotización
|
||||
ConfirmClonePropal=¿Está seguro de querer clonar la cotización <b>%s</b>?
|
||||
ConfirmReOpenProp=¿Está seguro de querer reabrir la cotización <b>%s</b> ?
|
||||
ProposalsAndProposalsLines=Cotizaciones a clientes y líneas de cotizaciones
|
||||
ProposalLine=Línea de cotización
|
||||
##### Types de contacts #####
|
||||
TypeContact_propal_internal_SALESREPFOLL=Comercial seguimiento cotización
|
||||
TypeContact_propal_external_BILLING=Contacto cliente de facturación cotización
|
||||
TypeContact_propal_external_CUSTOMER=Contacto cliente seguimiento cotización
|
||||
# Document models
|
||||
DocModelAzurDescription=Modelo de cotización completa (logo...)
|
||||
DocModelJauneDescription=Modelo de cotización Jaune
|
||||
DefaultModelPropalToBill=Modelo por defecto al cerrar una cotización (a facturar)
|
||||
DefaultModelPropalClosed=Modelo por defecto al cerrar una cotización (no facturado)
|
||||
3
htdocs/langs/es_CL/workflow.lang
Normal file
3
htdocs/langs/es_CL/workflow.lang
Normal file
@ -0,0 +1,3 @@
|
||||
descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crear un pedido de cliente automáticamente a la firma de una cotización
|
||||
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Crear una factura a cliente automáticamente a la firma de una cotización
|
||||
descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar como facturada la cotización cuando el pedido de cliente relacionado se clasifique como pagado
|
||||
@ -84,7 +84,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto);
|
||||
print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans('CommercialAgent').'</td>';
|
||||
print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>';
|
||||
print '<td colspan="4">';
|
||||
print $form->select_dolusers($agentid,'agentid',1);
|
||||
print '</td></tr>';
|
||||
@ -155,7 +155,7 @@ if ($result)
|
||||
if ($agentid > 0)
|
||||
print_liste_field_titre($langs->trans("Customer"),$_SERVER["PHP_SELF"],"s.nom","","&agentid=".$agentid,'',$sortfield,$sortorder);
|
||||
else
|
||||
print_liste_field_titre($langs->trans("CommercialAgent"),$_SERVER["PHP_SELF"],"u.lastname","","&agentid=".$agentid,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("SalesRepresentative"),$_SERVER["PHP_SELF"],"u.lastname","","&agentid=".$agentid,'',$sortfield,$sortorder);
|
||||
|
||||
print_liste_field_titre($langs->trans("SellingPrice"),$_SERVER["PHP_SELF"],"selling_price","","&agentid=".$agentid,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("BuyingPrice"),$_SERVER["PHP_SELF"],"buying_price","","&agentid=".$agentid,'align="right"',$sortfield,$sortorder);
|
||||
|
||||
@ -73,7 +73,7 @@ function marges_prepare_head()
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/margin/agentMargins.php";
|
||||
$head[$h][1] = $langs->trans("AgentMargins");
|
||||
$head[$h][1] = $langs->trans("SalesRepresentativeMargins");
|
||||
$head[$h][2] = 'agentMargins';
|
||||
$h++;
|
||||
|
||||
@ -102,7 +102,7 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta
|
||||
if ($fk_pa > 0) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$product = new ProductFournisseur($db);
|
||||
if ($product->fetch_product_fournisseur_price($fk_pa))
|
||||
if ($product->fetch_product_fournisseur_price($fk_pa))
|
||||
{
|
||||
$paht_ret = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100);
|
||||
if ($conf->global->MARGIN_TYPE == "2" && $product->fourn_unitcharges > 0)
|
||||
@ -113,11 +113,11 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta
|
||||
$paht_ret = $paht;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$paht_ret = $paht;
|
||||
}
|
||||
|
||||
|
||||
// Calculate selling unit price including line discount
|
||||
// We don't use calculate_price, because this function is dedicated to calculation of total with accuracy of total. We need an accuracy of a unit price.
|
||||
// Also we must not apply rounding on non decimal rule defined by option MAIN_ROUNDING_RULE_TOT
|
||||
|
||||
@ -144,9 +144,8 @@ if ($object->id > 0)
|
||||
print "</table>\n";
|
||||
print "</div>\n";
|
||||
|
||||
$modulepart = 'projet';
|
||||
$modulepart = 'project';
|
||||
$permission = ($userWrite > 0);
|
||||
$param = '&id=' . $object->id;
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||
|
||||
}
|
||||
|
||||
@ -110,6 +110,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -229,9 +230,11 @@ if ($object->id > 0)
|
||||
|
||||
print '<br>';
|
||||
|
||||
$modulepart = 'projet';
|
||||
$param='';
|
||||
if ($withproject) $param .= '&withproject=1';
|
||||
$modulepart = 'project_task';
|
||||
$permission = $user->rights->projet->creer;
|
||||
$param = '&id=' . $object->id;
|
||||
$relativepathwithnofile=dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
|
||||
}
|
||||
else
|
||||
|
||||
@ -313,15 +313,6 @@ class DateLibTest extends PHPUnit_Framework_TestCase
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
$conf->global->MAIN_OLD_DATE=1;
|
||||
|
||||
$stime='19700102';
|
||||
$result=dol_stringtotime($stime);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals(86400,$result);
|
||||
|
||||
$conf->global->MAIN_OLD_DATE=0;
|
||||
|
||||
$stime='19700102';
|
||||
$result=dol_stringtotime($stime);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
"Name* (s.nom)";"Status (s.status)";"Customer* (s.client)";"Supplier* (s.fournisseur)";"DateCreation (s.datec)";"CustomerCode (s.code_client)";"SupplierCode (s.code_fournisseur)";"Address (s.address)";"Zip (s.cp)";"Town (s.ville)";"Phone (s.tel)";"Fax (s.fax)";"Url (s.url)";"Email (s.email)";"IdProf1 (s.siret)";"IdProf2 (s.siren)";"IdProf3 (s.ape)";"IdProf4 (s.idprof4)";"VATIntraShort (s.tva_intra)";"Capital (s.capital)";"Note (s.note)";"ThirdPartyType (s.fk_typent)";"Effectif (s.fk_effectif)";"JuridicalStatus (s.fk_forme_juridique)";"ProspectLevel (s.fk_prospectlevel)";"ProspectStatus (s.fk_stcomm)";"DefaultLanguage (s.default_lang)";"BarCode (s.barcode)"
|
||||
"MyBigCompanyImport1";1;3;1;01/01/00;"CU01-0001";"SU01-0001";"61 jump street";123456;"Big town";101010101;101010102;"http://mycompany.com";"test@mycompany.com";;;;;"FR0123456789";10000;"This is an example of note for record";2;3;1;"PL_MEDIUM";1;"en_US";123456789
|
||||
"MyBigCompanyImport1";1;3;1;01/01/00;"CU01-0001";"SU01-0001";"61 jump street";123456;"Big town";101010101;101010111;"http://mycompany.com";"test@mycompany.com";;;;;"FR0123456781";10000;"This is an example of note for record 1";2;3;1;"PL_MEDIUM";1;"en_US";123456781
|
||||
"MyBigCompanyImport2";1;3;1;01/01/00;"auto";;"62 jump street";123456;"Big town";101010102;101010112;"http://mycompany2.com";"test@mycompany2.com";;;;;"FR0123456782";10000;"This is an example of note for record 2";2;3;1;"PL_MEDIUM";1;"en_US";auto
|
||||
|
||||
|
@ -162,7 +162,7 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
|
||||
$file=dirname(__FILE__).'/Example_import_company_1.csv';
|
||||
$result=dol_count_nb_of_line($file);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals(2,$result);
|
||||
$this->assertEquals(3,$result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -367,6 +367,14 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDolMkTime()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$savtz=date_default_timezone_get();
|
||||
|
||||
// Some test for UTC TZ
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
// Check bad hours
|
||||
$result=dol_mktime(25,0,0,1,1,1970,1,1); // Error (25 hours)
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals('',$result);
|
||||
@ -390,7 +398,22 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
$result=dol_mktime(2,0,0,1,1,1970,0); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$tz=getServerTimeZoneInt('winter'); // +1 in Europe/Paris at this time (this time is winter)
|
||||
$this->assertEquals(7200-($tz*3600),$result); // Should be 7200 if we are at greenwich winter
|
||||
$this->assertEquals(7200-($tz*3600),$result); // 7200 if we are at greenwich winter, 7200-($tz*3600) at local winter
|
||||
|
||||
// Some test for local TZ Europe/Paris
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
|
||||
// Check that tz for paris in winter is used
|
||||
$result=dol_mktime(2,0,0,1,1,1970,'server'); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals(3600,$result); // 7200 if we are at greenwich winter, 3600 at Europe/Paris
|
||||
|
||||
// Check that daylight saving time is used
|
||||
$result=dol_mktime(2,0,0,6,1,2014,0); // 2014-06-01 02:00:00 = 1401588000-3600(location)-3600(daylight) in local area Europe/Paris = 1401588000 GMT
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals(1401588000-3600-3600,$result); // 1401588000 are at greenwich summer, 1401588000-3600(location)-3600(daylight) at Europe/Paris summer
|
||||
|
||||
date_default_timezone_set($savtz);
|
||||
}
|
||||
|
||||
|
||||
@ -574,11 +597,11 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
// Test RULE 2 (FR-FR)
|
||||
$vat=get_default_tva($companyfr,$companyfr,0);
|
||||
$this->assertEquals(19.6,$vat);
|
||||
$this->assertEquals(20,$vat);
|
||||
|
||||
// Test RULE 2 (FR-MC)
|
||||
$vat=get_default_tva($companyfr,$companymc,0);
|
||||
$this->assertEquals(19.6,$vat);
|
||||
$this->assertEquals(20,$vat);
|
||||
|
||||
// Test RULE 3 (FR-IT)
|
||||
$vat=get_default_tva($companyfr,$companyit,0);
|
||||
@ -586,7 +609,7 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
// Test RULE 4 (FR-IT)
|
||||
$vat=get_default_tva($companyfr,$notcompanyit,0);
|
||||
$this->assertEquals(19.6,$vat);
|
||||
$this->assertEquals(20,$vat);
|
||||
|
||||
// Test RULE 5 (FR-US)
|
||||
$vat=get_default_tva($companyfr,$companyus,0);
|
||||
|
||||
@ -125,7 +125,10 @@ class ImportTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$file=dirname(__FILE__).'/Example_import_company_1.csv';
|
||||
|
||||
//if (! preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/i','2012-03-23')) print 'eeeeeeeeeeee';
|
||||
// TODO
|
||||
// Run import on file and check the record with field "auto" are filled
|
||||
// according to option
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user