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

This commit is contained in:
Laurent Destailleur 2012-03-14 11:50:22 +01:00
commit fafc61b1d9
139 changed files with 381 additions and 883 deletions

View File

@ -201,19 +201,6 @@ if ($action == 'create')
}
print '</td></tr>';
// Delivery address
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td>'.$langs->trans('DeliveryAddress').'</td>';
print '<td colspan="3">';
$numaddress = $form->select_address($soc->fk_delivery_address, $_GET['socid'],'fk_address',1);
if ($numaddress==0)
{
print ' &nbsp; <a href=../comm/address.php?socid='.$soc->id.'&action=create>'.$langs->trans("AddAddress").'</a>';
}
print '</td></tr>';
}
// Model
print '<tr>';
print '<td>'.$langs->trans("DefaultModel").'</td>';

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
*
* 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
@ -20,7 +20,7 @@
/**
* \file htdocs/comm/address.php
* \ingroup societe
* \brief Tab address of customer
* \brief Tab address of thirdparty
*/
require("../main.inc.php");
@ -31,58 +31,63 @@ require_once(DOL_DOCUMENT_ROOT."/societe/class/address.class.php");
$langs->load("companies");
$langs->load("commercial");
$id = isset($_GET["id"])?$_GET["id"]:'';
$origin = isset($_GET["origin"])?$_GET["origin"]:'';
$originid = isset($_GET["originid"])?$_GET["originid"]:'';
$socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:'';
if (! $socid && ($_REQUEST["action"] != 'create' && $_REQUEST["action"] != 'add' && $_REQUEST["action"] != 'update')) accessforbidden();
$id = GETPOST('id','int');
$action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');
$origin = GETPOST('origin','alpha');
$originid = GETPOST('originid','int');
$socid = GETPOST('socid','int');
if (! $socid && ($action != 'create' && $action != 'add' && $action != 'update')) accessforbidden();
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe', $socid);
$object = new Address($db);
/*
* Actions
*/
if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
if ($action == 'add' || $action == 'update')
{
$address = new Address($db);
$address->socid = $_POST["socid"];
$address->label = ($_POST["label"]!=$langs->trans('RequiredField')?$_POST["label"]:'');
$address->name = ($_POST["name"]!=$langs->trans('RequiredField')?$_POST["name"]:'');
$address->address = $_POST["address"];
$address->cp = $_POST["zipcode"];
$address->ville = $_POST["town"];
$address->zip = $_POST["zipcode"];
$address->town = $_POST["town"];
$address->pays_id = $_POST["country_id"];
$address->country_id= $_POST["country_id"];
$address->tel = $_POST["tel"];
$address->fax = $_POST["fax"];
$address->note = $_POST["note"];
if ($_POST["action"] == 'add')
$object->socid = $socid;
$object->label = ($_POST["label"]!=$langs->trans('RequiredField')?$_POST["label"]:'');
$object->name = ($_POST["name"]!=$langs->trans('RequiredField')?$_POST["name"]:'');
$object->address = $_POST["address"];
$object->cp = $_POST["zipcode"];
$object->ville = $_POST["town"];
$object->zip = $_POST["zipcode"];
$object->town = $_POST["town"];
$object->pays_id = $_POST["country_id"];
$object->country_id= $_POST["country_id"];
$object->tel = $_POST["tel"];
$object->fax = $_POST["fax"];
$object->note = $_POST["note"];
// Add new address
if ($action == 'add')
{
$socid = $_POST["socid"];
$origin = $_POST["origin"];
$originid = $_POST["originid"];
$result = $address->create($socid, $user);
$result = $object->create($socid, $user);
if ($result >= 0)
{
if ($origin == 'commande')
{
Header("Location: ../commande/fiche.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
Header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
exit;
}
elseif ($origin == 'propal')
{
Header("Location: ../comm/propal.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
exit;
}
elseif ($origin == 'shipment')
{
Header("Location: ../expedition/fiche.php?id=".$originid);
exit;
}
else
{
Header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
@ -91,28 +96,26 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
}
else
{
$mesg = $address->error;
$_GET["action"]='create';
$mesg = $object->error;
$action='create';
}
}
if ($_POST["action"] == 'update')
// Update address
else if ($action == 'update')
{
$socid = $_POST["socid"];
$origin = $_POST["origin"];
$originid = $_POST["originid"];
$result = $address->update($_POST["id"], $socid, $user);
$result = $object->update($_POST["id"], $socid, $user);
if ($result >= 0)
{
if ($origin == 'commande')
{
Header("Location: ../commande/fiche.php?id=".$originid);
Header("Location: ../commande/contact.php?id=".$originid);
exit;
}
elseif ($origin == 'propal')
{
Header("Location: ../comm/propal.php?id=".$originid);
Header("Location: ../comm/propal/contact.php?id=".$originid);
exit;
}
elseif ($origin == 'shipment')
@ -129,17 +132,16 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
else
{
$reload = 0;
$mesg = $address->error;
$_GET["action"]= "edit";
$mesg = $object->error;
$actino= "edit";
}
}
}
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->societe->supprimer)
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
{
$address = new Address($db);
$result = $address->delete($_GET["id"], $socid);
$result = $object->delete($id, $socid);
if ($result == 0)
{
@ -149,7 +151,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user-
else
{
$reload = 0;
$_GET["action"]='';
$action='';
}
}
@ -167,7 +169,7 @@ $countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("Se
dol_htmloutput_errors($mesg);
if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
if ($action == 'create')
{
if ($user->rights->societe->creer)
{
@ -175,8 +177,6 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
* Creation
*/
$address = new Address($db);
$societe=new Societe($db);
$societe->fetch($socid);
$head = societe_prepare_head($societe);
@ -185,35 +185,35 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
if ($_POST["label"] && $_POST["name"])
{
$address->socid = $_POST["socid"];
$address->label = $_POST["label"];
$address->name = $_POST["name"];
$address->address = $_POST["address"];
$address->cp = $_POST["zipcode"];
$address->ville = $_POST["town"];
$address->tel = $_POST["tel"];
$address->fax = $_POST["fax"];
$address->note = $_POST["note"];
$object->socid = $socid;
$object->label = $_POST["label"];
$object->name = $_POST["name"];
$object->address = $_POST["address"];
$object->cp = $_POST["zipcode"];
$object->ville = $_POST["town"];
$object->tel = $_POST["tel"];
$object->fax = $_POST["fax"];
$object->note = $_POST["note"];
}
// On positionne pays_id, pays_code et libelle du pays choisi
$address->country_id=$_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
if ($address->country_id)
$object->country_id=$_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
if ($object->country_id)
{
$tmparray=getCountry($address->country_id,'all');
$address->pays_code = $tmparray['code'];
$address->pays = $tmparray['label'];
$address->country_code = $tmparray['code'];
$address->country = $tmparray['label'];
$tmparray=getCountry($object->country_id,'all');
$object->pays_code = $tmparray['code'];
$object->pays = $tmparray['label'];
$object->country_code = $tmparray['code'];
$object->country = $tmparray['label'];
}
print_titre($langs->trans("AddAddress"));
print "<br>\n";
if ($address->error)
if ($object->error)
{
print '<div class="error">';
print nl2br($address->error);
print nl2br($object->error);
print '</div>';
}
@ -221,23 +221,23 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
if ($conf->use_javascript_ajax)
{
print "\n".'<script type="text/javascript" language="javascript">';
print 'jQuery(document).ready(function () {
jQuery("#label").focus(function() {
print '$(document).ready(function () {
$("#label").focus(function() {
hideMessage("label","'.$langs->trans('RequiredField').'");
});
jQuery("#label").blur(function() {
$("#label").blur(function() {
displayMessage("label","'.$langs->trans('RequiredField').'");
});
jQuery("#name").focus(function() {
$("#name").focus(function() {
hideMessage("name","'.$langs->trans('RequiredField').'");
});
jQuery("#name").blur(function() {
$("#name").blur(function() {
displayMessage("name","'.$langs->trans('RequiredField').'");
});
displayMessage("label","'.$langs->trans('RequiredField').'");
displayMessage("name","'.$langs->trans('RequiredField').'");
jQuery("#label").css("color","grey");
jQuery("#name").css("color","grey");
$("#label").css("color","grey");
$("#name").css("color","grey");
})';
print '</script>'."\n";
}
@ -251,33 +251,33 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
print '<table class="border" width="100%">';
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($address->label?$address->label:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($address->name?$address->name:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($object->label?$object->label:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($object->name?$object->name:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
print $address->address;
print $object->address;
print '</textarea></td></tr>';
// Zip
print '<tr><td>'.$langs->trans('Zip').'</td><td>';
print $formcompany->select_ziptown($address->cp,'zipcode',array('town','selectcountry_id'),6);
print $formcompany->select_ziptown($object->cp,'zipcode',array('town','selectcountry_id'),6);
print '</td></tr>';
// Town
print '<tr><td>'.$langs->trans('Town').'</td><td>';
print $formcompany->select_ziptown($address->ville,'town',array('zipcode','selectcountry_id'));
print $formcompany->select_ziptown($object->ville,'town',array('zipcode','selectcountry_id'));
print '</td></tr>';
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
print $form->select_country($address->country_id,'selectcountry_id');
print $form->select_country($object->country_id,'selectcountry_id');
print '</td></tr>';
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$address->tel.'"></td></tr>';
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$object->tel.'"></td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$address->fax.'"></td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
print $address->note;
print $object->note;
print '</textarea></td></tr>';
print '</table>'."\n";
@ -289,15 +289,14 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
}
}
elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
elseif ($action == 'edit')
{
/*
* Fiche societe en mode edition
*/
$address = new Address($db);
$societe=new Societe($db);
$societe->fetch($_GET["socid"]);
$societe->fetch($socid);
$head = societe_prepare_head($societe);
dol_fiche_head($head, 'customer', $societe->nom);
@ -309,78 +308,78 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
{
if ($reload || ! $_POST["name"])
{
$address->socid = $socid;
$address->fetch_address($id);
$object->socid = $socid;
$object->fetch_address($id);
}
else
{
$address->id = $_POST["id"];
$address->socid = $_POST["socid"];
$address->label = $_POST["label"];
$address->name = $_POST["name"];
$address->address = $_POST["address"];
$address->cp = $_POST["zipcode"];
$address->ville = $_POST["town"];
$address->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
$address->tel = $_POST["tel"];
$address->fax = $_POST["fax"];
$address->note = $_POST["note"];
$object->id = $id;
$object->socid = $socid;
$object->label = $_POST["label"];
$object->name = $_POST["name"];
$object->address = $_POST["address"];
$object->cp = $_POST["zipcode"];
$object->ville = $_POST["town"];
$object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
$object->tel = $_POST["tel"];
$object->fax = $_POST["fax"];
$object->note = $_POST["note"];
// On positionne country_id, pays_code et libelle du pays choisi
if ($address->country_id)
if ($object->country_id)
{
$tmparray=getCountry($address->country_id,'all');
$address->pays_code = $tmparray['code'];
$address->pays = $tmparray['label'];
$address->country_code = $tmparray['code'];
$address->country = $tmparray['label'];
$tmparray=getCountry($object->country_id,'all');
$object->pays_code = $tmparray['code'];
$object->pays = $tmparray['label'];
$object->country_code = $tmparray['code'];
$object->country = $tmparray['label'];
}
}
if ($address->error)
if ($object->error)
{
print '<div class="error">';
print $address->error;
print $object->error;
print '</div>';
}
print '<form action="'.$_SERVER['PHP_SELF'].'?socid='.$address->socid.'" method="POST" name="formsoc">';
print '<form action="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'" method="POST" name="formsoc">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="socid" value="'.$address->socid.'">';
print '<input type="hidden" name="socid" value="'.$object->socid.'">';
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="originid" value="'.$originid.'">';
print '<input type="hidden" name="id" value="'.$address->id.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<table class="border" width="100%">';
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$address->label.'"></td></tr>';
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$address->name.'"></td></tr>';
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$object->label.'"></td></tr>';
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$object->name.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
print $address->address;
print $object->address;
print '</textarea></td></tr>';
// Zip
print '<tr><td>'.$langs->trans('Zip').'</td><td>';
print $formcompany->select_ziptown($address->cp,'zipcode',array('town','selectcountry_id'),6);
print $formcompany->select_ziptown($object->cp,'zipcode',array('town','selectcountry_id'),6);
print '</td></tr>';
// Town
print '<tr><td>'.$langs->trans('Town').'</td><td>';
print $formcompany->select_ziptown($address->ville,'town',array('zipcode','selectcountry_id'));
print $formcompany->select_ziptown($object->ville,'town',array('zipcode','selectcountry_id'));
print '</td></tr>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
print $form->select_country($address->country_id,'country_id');
print $form->select_country($object->country_id,'country_id');
print '</td></tr>';
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$address->tel.'"></td></tr>';
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="tel" value="'.$object->tel.'"></td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$address->fax.'"></td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
print $address->note;
print $object->note;
print '</textarea></td></tr>';
print '<tr><td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
@ -394,16 +393,16 @@ else
/*
* Fiche societe en mode visu
*/
$address = new Address($db);
$result=$address->fetch_lines($socid);
$result=$object->fetch_lines($socid);
if ($result < 0)
{
dol_print_error($db,$address->error);
dol_print_error($db,$object->error);
exit;
}
$societe=new Societe($db);
$societe->fetch($address->socid);
$societe->fetch($object->socid);
$head = societe_prepare_head($societe);
dol_fiche_head($head, 'customer', $societe->nom);
@ -413,18 +412,18 @@ else
if ($_GET["action"] == 'delete')
{
$form = new Form($db);
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?socid=".$address->socid."&amp;id=".$_GET["id"],$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&amp;id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
if ($ret == 'html') print '<br>';
}
if ($address->error)
if ($object->error)
{
print '<div class="error">';
print $address->error;
print $object->error;
print '</div>';
}
$nblines = count($address->lines);
$nblines = count($object->lines);
if ($nblines)
{
for ($i = 0 ; $i < $nblines ; $i++)
@ -432,20 +431,20 @@ else
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans('AddressLabel').'</td><td colspan="3">'.$address->lines[$i]->label.'</td>';
print '<td valign="top" colspan="2" width="50%" rowspan="6">'.$langs->trans('Note').' :<br>'.nl2br($address->lines[$i]->note).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$address->lines[$i]->name.'</td></tr>';
print '<tr><td width="20%">'.$langs->trans('AddressLabel').'</td><td colspan="3">'.$object->lines[$i]->label.'</td>';
print '<td valign="top" colspan="2" width="50%" rowspan="6">'.$langs->trans('Note').' :<br>'.nl2br($object->lines[$i]->note).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$object->lines[$i]->name.'</td></tr>';
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($address->lines[$i]->address)."</td></tr>";
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($object->lines[$i]->address)."</td></tr>";
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$address->lines[$i]->cp."</td></tr>";
print '<tr><td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$address->lines[$i]->ville."</td></tr>";
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->lines[$i]->cp."</td></tr>";
print '<tr><td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->lines[$i]->ville."</td></tr>";
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$address->lines[$i]->pays.'</td>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$object->lines[$i]->pays.'</td>';
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($address->lines[$i]->tel,$address->lines[$i]->country_code,0,$address->socid,'AC_TEL').'</td></tr>';
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($object->lines[$i]->tel,$object->lines[$i]->country_code,0,$object->socid,'AC_TEL').'</td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($address->lines[$i]->fax,$address->lines[$i]->country_code,0,$address->socid,'AC_FAX').'</td></tr>';
print '<tr><td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($object->lines[$i]->fax,$object->lines[$i]->country_code,0,$object->socid,'AC_FAX').'</td></tr>';
print '</td></tr>';
@ -460,12 +459,12 @@ else
if ($user->rights->societe->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$address->socid.'&amp;id='.$address->lines[$i]->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>';
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;id='.$object->lines[$i]->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>';
}
if ($user->rights->societe->supprimer)
{
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?socid='.$address->socid.'&amp;id='.$address->lines[$i]->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;id='.$object->lines[$i]->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}
@ -484,21 +483,20 @@ else
* Bouton actions
*/
if ($_GET["action"] == '')
if ($action == '')
{
print '<div class="tabsAction">';
if ($user->rights->societe->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$address->socid.'&amp;action=create">'.$langs->trans("Add").'</a>';
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;action=create">'.$langs->trans("Add").'</a>';
}
print '</div>';
}
}
$db->close();
llxFooter();
?>

View File

@ -37,7 +37,6 @@ if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/class/co
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
if ($conf->adherent->enabled) require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
if ($conf->ficheinter->enabled) require_once(DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php");
if (!empty($conf->global->MAIN_MODULE_CHRONODOCS)) require_once(DOL_DOCUMENT_ROOT."/chronodocs/chronodocs_entries.class.php");
$langs->load("companies");
if ($conf->contrat->enabled) $langs->load("contracts");
@ -46,7 +45,6 @@ if ($conf->facture->enabled) $langs->load("bills");
if ($conf->projet->enabled) $langs->load("projects");
if ($conf->ficheinter->enabled) $langs->load("interventions");
if ($conf->notification->enabled) $langs->load("mails");
if (!empty($conf->global->MAIN_MODULE_CHRONODOCS)) $langs->load("chronodocs");
// Security check
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));

View File

@ -246,13 +246,6 @@ else if ($action == 'setdate_livraison')
if ($result < 0) dol_print_error($db,$object->error);
}
else if ($action == 'setaddress' && $user->rights->propale->creer)
{
$object->fetch($id);
$result=$object->set_adresse_livraison($user,$_POST['fk_address']);
if ($result < 0) dol_print_error($db,$object->error);
}
// Positionne ref client
else if ($action == 'set_ref_client' && $user->rights->propale->creer)
{
@ -1340,29 +1333,6 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '</tr>';
// Delivery address (deprecated)
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdelivery_address')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','propal',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','propal',$object->id);
}
print '</td></tr>';
}
// Delivery delay
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';

View File

@ -1282,34 +1282,6 @@ class Propal extends CommonObject
}
}
/**
* Define delivery address
*
* @param User $user Object user that modify
* @param int $fk_address Delivery address id
* @return int <0 si ko, >0 si ok
*/
function set_adresse_livraison($user, $fk_address)
{
if ($user->rights->propale->creer)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_adresse_livraison = '".$fk_address."'";
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
if ($this->db->query($sql) )
{
$this->fk_delivery_address = $fk_address;
return 1;
}
else
{
$this->error=$this->db->error();
dol_syslog("Propal::set_adresse_livraison Erreur SQL");
return -1;
}
}
}
/**
* Set delivery
*
@ -1880,78 +1852,6 @@ class Propal extends CommonObject
}
}
/**
* Change the payments conditions of the invoice
*
* @param int $cond_reglement_id Id of new payment condition
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function cond_reglement($cond_reglement_id)
{
dol_syslog('Propale::cond_reglement('.$cond_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'propal';
$sql .= ' SET fk_cond_reglement = '.$cond_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->cond_reglement_id = $cond_reglement_id;
return 1;
}
else
{
dol_syslog('Propale::cond_reglement Erreur '.$sql.' - '.$this->db->error());
$this->error=$this->db->error();
return -1;
}
}
else
{
dol_syslog('Propale::cond_reglement, etat propale incompatible');
$this->error='Etat propale incompatible '.$this->statut;
return -2;
}
}
/**
* Change the payment mode
*
* @param int $mode_reglement_id Id of new payment mode
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function mode_reglement($mode_reglement_id)
{
dol_syslog('Propale::mode_reglement('.$mode_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'propal';
$sql .= ' SET fk_mode_reglement = '.$mode_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->mode_reglement_id = $mode_reglement_id;
return 1;
}
else
{
dol_syslog('Propale::mode_reglement Erreur '.$sql.' - '.$this->db->error());
$this->error=$this->db->error();
return -1;
}
}
else
{
dol_syslog('Propale::mode_reglement, etat propale incompatible');
$this->error='Etat facture incompatible '.$this->statut;
return -2;
}
}
/**
* Change the delivery time
*

View File

@ -27,6 +27,7 @@ require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$langs->load("facture");
@ -43,6 +44,8 @@ $action=GETPOST('action', 'alpha');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'propale', $id, 'propal');
$object = new Propal($db);
/*
* Ajout d'un nouveau contact
@ -50,42 +53,38 @@ $result = restrictedArea($user, 'propale', $id, 'propal');
if ($action == 'addcontact' && $user->rights->propale->creer)
{
$result = 0;
$propal = new Propal($db);
$result = $propal->fetch($id);
$result = $object->fetch($id);
if ($result > 0 && $id > 0)
{
$result = $propal->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
$result = $object->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
}
if ($result >= 0)
{
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$propal->id);
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
else
{
if ($propal->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
}
else
{
$mesg = '<div class="error">'.$propal->error.'</div>';
$mesg = '<div class="error">'.$object->error.'</div>';
}
}
}
// Bascule du statut d'un contact
if ($action == 'swapstatut' && $user->rights->propale->creer)
else if ($action == 'swapstatut' && $user->rights->propale->creer)
{
$propal = new Propal($db);
if ($propal->fetch($id) > 0)
if ($object->fetch($id) > 0)
{
$result=$propal->swapContactStatus(GETPOST('ligne'));
$result=$object->swapContactStatus(GETPOST('ligne'));
}
else
{
@ -94,15 +93,14 @@ if ($action == 'swapstatut' && $user->rights->propale->creer)
}
// Efface un contact
if ($action == 'deleteline' && $user->rights->propale->creer)
else if ($action == 'deleteline' && $user->rights->propale->creer)
{
$propal = new Propal($db);
$propal->fetch($id);
$result = $propal->delete_contact($lineid);
$object->fetch($id);
$result = $object->delete_contact($lineid);
if ($result >= 0)
{
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$propal->id);
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
else
@ -111,6 +109,13 @@ if ($action == 'deleteline' && $user->rights->propale->creer)
}
}
else if ($action == 'setaddress' && $user->rights->propale->creer)
{
$object->fetch($id);
$result=$object->setDeliveryAddress($_POST['fk_address']);
if ($result < 0) dol_print_error($db,$object->error);
}
/*
* View
@ -120,6 +125,7 @@ llxHeader('', $langs->trans("Proposal"), "Propal");
$form = new Form($db);
$formcompany= new FormCompany($db);
$formother = new FormOther($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@ -133,13 +139,12 @@ dol_htmloutput_mesg($mesg);
if ($id > 0 || ! empty($ref))
{
$propal = New Propal($db);
if ($propal->fetch($id,$ref) > 0)
if ($object->fetch($id,$ref) > 0)
{
$soc = new Societe($db);
$soc->fetch($propal->socid);
$soc->fetch($object->socid);
$head = propal_prepare_head($propal);
$head = propal_prepare_head($object);
dol_fiche_head($head, 'contact', $langs->trans("Proposal"), 0, 'propal');
/*
@ -151,7 +156,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
print $form->showrefnav($propal,'ref',$linkback,1,'ref','ref','');
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print '</td></tr>';
// Ref client
@ -161,15 +166,37 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '</tr></table>';
print '</td><td colspan="3">';
print $propal->ref_client;
print $object->ref_client;
print '</td>';
print '</tr>';
// Customer
if ( is_null($propal->client) )
$propal->fetch_thirdparty();
if (is_null($object->client)) $object->fetch_thirdparty();
print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$propal->client->getNomUrl(1).'</td></tr>';
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
// Delivery address
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdelivery_address')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','propal',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','propal',$object->id);
}
print '</td></tr>';
}
print "</table>";
@ -215,11 +242,11 @@ if ($id > 0 || ! empty($ref))
print '<td>';
// On recupere les id des users deja selectionnes
//$userAlreadySelected = $propal->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
//$userAlreadySelected = $object->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
$form->select_users($user->id,'contactid',0,$userAlreadySelected);
print '</td>';
print '<td>';
$formcompany->selectTypeContact($propal, '', 'type','internal');
$formcompany->selectTypeContact($object, '', 'type','internal');
print '</td>';
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
@ -241,8 +268,8 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '<td>';
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$propal->client->id;
$selectedCompany = $formcompany->selectCompaniesForNewContact($propal, 'id', $selectedCompany, 'newcompany');
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$object->client->id;
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany');
print '</td>';
print '<td>';
@ -250,7 +277,7 @@ if ($id > 0 || ! empty($ref))
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>';
print '<td>';
$formcompany->selectTypeContact($propal, '', 'type','external');
$formcompany->selectTypeContact($object, '', 'type','external');
print '</td>';
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"';
if (! $nbofcontacts) print ' disabled="disabled"';
@ -278,7 +305,7 @@ if ($id > 0 || ! empty($ref))
foreach(array('internal','external') as $source)
{
$tab = $propal->liste_contact(-1,$source);
$tab = $object->liste_contact(-1,$source);
$num=count($tab);
$i = 0;
@ -335,9 +362,9 @@ if ($id > 0 || ! empty($ref))
// Statut
print '<td align="center">';
// Activation desativation du contact
if ($propal->statut >= 0) print '<a href="contact.php?id='.$propal->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
if ($object->statut >= 0) print '<a href="contact.php?id='.$object->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
print $contactstatic->LibStatut($tab[$i]['status'],3);
if ($propal->statut >= 0) print '</a>';
if ($object->statut >= 0) print '</a>';
print '</td>';
// Icon update et delete
@ -345,7 +372,7 @@ if ($id > 0 || ! empty($ref))
if ($user->rights->propale->creer)
{
print '&nbsp;';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$propal->id.'&amp;action=deleteline&amp;lineid='.$tab[$i]['rowid'].'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=deleteline&amp;lineid='.$tab[$i]['rowid'].'">';
print img_delete();
print '</a>';
}
@ -364,8 +391,6 @@ if ($id > 0 || ! empty($ref))
}
}
llxFooter();
$db->close();
llxFooter();
?>

View File

@ -1844,34 +1844,6 @@ class Commande extends CommonObject
}
}
/**
* Set address
*
* @param User $user Object user making change
* @param int $fk_address Adress of delivery
* @return int <0 ig KO, >0 if Ok
*/
function set_adresse_livraison($user, $fk_address)
{
if ($user->rights->commande->creer)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_adresse_livraison = '".$fk_address."'";
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
if ($this->db->query($sql) )
{
$this->fk_delivery_address = $fk_address;
return 1;
}
else
{
$this->error=$this->db->error();
dol_syslog("Commande::set_adresse_livraison Erreur SQL");
return -1;
}
}
}
/**
* Set availability
*
@ -1975,77 +1947,6 @@ class Commande extends CommonObject
}
}
/**
* Change les conditions de reglement de la commande
*
* @param int $cond_reglement_id Id de la nouvelle condition de reglement
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function cond_reglement($cond_reglement_id)
{
dol_syslog('Commande::cond_reglement('.$cond_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
$sql .= ' SET fk_cond_reglement = '.$cond_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->cond_reglement_id = $cond_reglement_id;
return 1;
}
else
{
dol_syslog('Commande::cond_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('Commande::cond_reglement, etat commande incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Change le mode de reglement
*
* @param int $mode Id du nouveau mode
* @return int >0 si ok, <0 si ko
* TODO deprecated
*/
function mode_reglement($mode_reglement_id)
{
dol_syslog('Commande::mode_reglement('.$mode_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
$sql .= ' SET fk_mode_reglement = '.$mode_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->mode_reglement_id = $mode_reglement_id;
return 1;
}
else
{
dol_syslog('Commande::mode_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('Commande::mode_reglement, etat facture incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Change le delai de livraison
*

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
*
* 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
@ -27,61 +27,61 @@ require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/order.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$langs->load("orders");
$langs->load("sendings");
$langs->load("companies");
$comid = isset($_GET["id"])?$_GET["id"]:'';
$id=GETPOST('id','int');
$ref=GETPOST('ref','alpha');
$action=GETPOST('action','alpha');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'commande', $comid,'');
$result = restrictedArea($user, 'commande', $id,'');
$object = new Commande($db);
/*
* Ajout d'un nouveau contact
*/
if ($_POST["action"] == 'addcontact' && $user->rights->commande->creer)
if ($action == 'addcontact' && $user->rights->commande->creer)
{
$result = $object->fetch($id);
$result = 0;
$commande = new Commande($db);
$result = $commande->fetch($_GET["id"]);
if ($result > 0 && $_GET["id"] > 0)
if ($result > 0 && $id > 0)
{
$result = $commande->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
$result = $object->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
}
if ($result >= 0)
{
Header("Location: contact.php?id=".$commande->id);
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
else
{
if ($commande->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
}
else
{
$mesg = '<div class="error">'.$commande->error.'</div>';
$mesg = '<div class="error">'.$object->error.'</div>';
}
}
}
// bascule du statut d'un contact
if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
else if ($action == 'swapstatut' && $user->rights->commande->creer)
{
$commande = new Commande($db);
if ($commande->fetch(GETPOST('id','int')))
if ($object->fetch($id))
{
$result=$commande->swapContactStatus(GETPOST('ligne'));
$result=$object->swapContactStatus(GETPOST('ligne'));
}
else
{
@ -90,15 +90,14 @@ if ($_GET["action"] == 'swapstatut' && $user->rights->commande->creer)
}
// Efface un contact
if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer)
else if ($action == 'deleteline' && $user->rights->commande->creer)
{
$commande = new Commande($db);
$commande->fetch($_GET["id"]);
$result = $commande->delete_contact($_GET["lineid"]);
$object->fetch($id);
$result = $object->delete_contact($_GET["lineid"]);
if ($result >= 0)
{
Header("Location: contact.php?id=".$commande->id);
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
else {
@ -106,6 +105,11 @@ if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer)
}
}
else if ($action == 'setaddress' && $user->rights->commande->creer)
{
$object->fetch($id);
$object->setDeliveryAddress($_POST['fk_address']);
}
/*
* View
@ -115,6 +119,7 @@ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES
$form = new Form($db);
$formcompany = new FormCompany($db);
$formother = new FormOther($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@ -126,19 +131,17 @@ $userstatic=new User($db);
/* *************************************************************************** */
dol_htmloutput_mesg($mesg);
$id = $_GET['id'];
$ref= $_GET['ref'];
if ($id > 0 || ! empty($ref))
{
$langs->trans("OrderCard");
$commande = new Commande($db);
if ( $commande->fetch($_GET['id'],$_GET['ref']) > 0)
if ($object->fetch($id, $ref) > 0)
{
$soc = new Societe($db);
$soc->fetch($commande->socid);
$soc->fetch($object->socid);
$head = commande_prepare_head($commande);
$head = commande_prepare_head($object);
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order');
@ -149,7 +152,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($commande,'ref','',1,'ref','ref');
print $form->showrefnav($object,'ref','',1,'ref','ref');
print "</td></tr>";
// Ref commande client
@ -159,16 +162,39 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '</tr></table>';
print '</td><td colspan="3">';
print $commande->ref_client;
print $object->ref_client;
print '</td>';
print '</tr>';
// Customer
if ( is_null($commande->client) )
$commande->fetch_thirdparty();
if (is_null($object->client)) $object->fetch_thirdparty();
print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$commande->client->getNomUrl(1).'</td></tr>';
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
// Delivery address
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdelivery_address')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id);
}
print '</td></tr>';
}
print "</table>";
print '</div>';
@ -182,7 +208,7 @@ if ($id > 0 || ! empty($ref))
* Ajouter une ligne de contact
* Non affiche en mode modification de ligne
*/
if ($_GET["action"] != 'editline' && $user->rights->commande->creer)
if ($action != 'editline' && $user->rights->commande->creer)
{
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Source").'</td>';
@ -195,7 +221,7 @@ if ($id > 0 || ! empty($ref))
$var = false;
print '<form action="contact.php?id='.$id.'" method="post">';
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="addcontact">';
print '<input type="hidden" name="source" value="internal">';
@ -213,18 +239,18 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '<td colspan="1">';
//$userAlreadySelected = $commande->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
//$userAlreadySelected = $object->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
$form->select_users($user->id,'contactid',0,$userAlreadySelected);
print '</td>';
print '<td>';
$formcompany->selectTypeContact($commande, '', 'type','internal');
$formcompany->selectTypeContact($object, '', 'type','internal');
print '</td>';
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
print '</form>';
print '<form action="contact.php?id='.$id.'" method="post">';
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="addcontact">';
print '<input type="hidden" name="source" value="external">';
@ -239,8 +265,8 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '<td colspan="1">';
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$commande->client->id;
$selectedCompany = $formcompany->selectCompaniesForNewContact($commande, 'id', $selectedCompany, 'newcompany');
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$object->client->id;
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany');
print '</td>';
print '<td colspan="1">';
@ -248,7 +274,7 @@ if ($id > 0 || ! empty($ref))
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>';
print '<td>';
$formcompany->selectTypeContact($commande, '', 'type','external');
$formcompany->selectTypeContact($object, '', 'type','external');
print '</td>';
print '<td align="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"';
if (! $nbofcontacts) print ' disabled="disabled"';
@ -275,7 +301,7 @@ if ($id > 0 || ! empty($ref))
foreach(array('internal','external') as $source)
{
$tab = $commande->liste_contact(-1,$source);
$tab = $object->liste_contact(-1,$source);
$num=count($tab);
$i = 0;
@ -332,17 +358,17 @@ if ($id > 0 || ! empty($ref))
// Statut
print '<td align="center">';
// Activation desativation du contact
if ($commande->statut >= 0) print '<a href="contact.php?id='.$commande->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
if ($object->statut >= 0) print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">';
print $contactstatic->LibStatut($tab[$i]['status'],3);
if ($commande->statut >= 0) print '</a>';
if ($object->statut >= 0) print '</a>';
print '</td>';
// Icon update et delete
print '<td align="center" nowrap="nowrap" colspan="2">';
if ($commande->statut < 5 && $user->rights->commande->creer)
if ($object->statut < 5 && $user->rights->commande->creer)
{
print '&nbsp;';
print '<a href="contact.php?id='.$commande->id.'&amp;action=deleteline&amp;lineid='.$tab[$i]['rowid'].'">';
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=deleteline&amp;lineid='.$tab[$i]['rowid'].'">';
print img_delete();
print '</a>';
}
@ -362,7 +388,7 @@ if ($id > 0 || ! empty($ref))
}
}
$db->close();
$db->close();
llxFooter();
?>

View File

@ -29,7 +29,6 @@
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formorder.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/modules/commande/modules_commande.php");
@ -440,12 +439,6 @@ if ($action == 'setdate_livraison' && $user->rights->commande->creer)
}
}
if ($action == 'setaddress' && $user->rights->commande->creer)
{
$object->fetch($id);
$object->set_adresse_livraison($user,$_POST['fk_address']);
}
if ($action == 'setmode' && $user->rights->commande->creer)
{
$object->fetch($id);
@ -1193,7 +1186,6 @@ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES
$form = new Form($db);
$formfile = new FormFile($db);
$formother = new FormOther($db);
$formorder = new FormOrder($db);
@ -1330,15 +1322,6 @@ if ($action == 'create' && $user->rights->commande->creer)
$form->select_date($datedelivery,'liv_','','','',"crea_commande",1,1);
print "</td></tr>";
// Delivery address
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td nowrap="nowrap">'.$langs->trans('DeliveryAddress').'</td><td colspan="2">';
$numaddress = $formother->select_address($soc->fk_delivery_address, $socid,'fk_address',1);
print ' &nbsp; <a href="../comm/address.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddAddress").'</a>';
print '</td></tr>';
}
// Conditions de reglement
print '<tr><td nowrap="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
$form->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id',-1,1);
@ -1802,29 +1785,6 @@ else
print '</td>';
print '</tr>';
// Delivery address
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_adress' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_adress&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editdelivery_adress')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'fk_address','commande',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'none','commande',$object->id);
}
print '</td></tr>';
}
// Terms of payment
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';

View File

@ -121,7 +121,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
}
// Change status of invoice
if ($action == 'reopen' && $user->rights->facture->creer)
else if ($action == 'reopen' && $user->rights->facture->creer)
{
$result = $object->fetch($id);
if ($object->statut == 2
@ -141,7 +141,7 @@ if ($action == 'reopen' && $user->rights->facture->creer)
}
// Delete invoice
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
{
if ($user->rights->facture->supprimer)
{
@ -160,7 +160,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->
}
// Delete line
if ($action == 'confirm_deleteline' && $confirm == 'yes')
else if ($action == 'confirm_deleteline' && $confirm == 'yes')
{
if ($user->rights->facture->creer)
{
@ -200,7 +200,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes')
}
// Delete link of credit note to invoice
if ($action == 'unlinkdiscount')
else if ($action == 'unlinkdiscount')
{
if ($user->rights->facture->creer)
{
@ -211,7 +211,7 @@ if ($action == 'unlinkdiscount')
}
// Validation
if ($action == 'valid')
else if ($action == 'valid')
{
$object->fetch($id);
@ -236,7 +236,7 @@ if ($action == 'valid')
}
}
if ($action == 'set_thirdparty')
else if ($action == 'set_thirdparty')
{
$object->fetch($id);
$object->setValueFrom('fk_soc',$socid);
@ -245,20 +245,20 @@ if ($action == 'set_thirdparty')
exit;
}
if ($action == 'classin')
else if ($action == 'classin')
{
$object->fetch($id);
$object->setProject($_POST['projectid']);
}
if ($action == 'setmode')
else if ($action == 'setmode')
{
$object->fetch($id);
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error);
}
if ($action == 'setinvoicedate')
else if ($action == 'setinvoicedate')
{
$object->fetch($id);
$object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
@ -267,16 +267,7 @@ if ($action == 'setinvoicedate')
if ($result < 0) dol_print_error($db,$object->error);
}
// TODO obsolete ? not used
if ($action == 'setpaymentterm')
{
$object->fetch($id);
$date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']);
$result=$object->cond_reglement($object->cond_reglement_id,$date_lim_reglement);
if ($result < 0) dol_print_error($db,$object->error);
}
if ($action == 'setconditions')
else if ($action == 'setconditions')
{
$object->fetch($id);
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
@ -289,7 +280,7 @@ if ($action == 'setremisepercent' && $user->rights->facture->creer)
$result = $object->set_remise($user, $_POST['remise_percent']);
}
if ($action == "setabsolutediscount" && $user->rights->facture->creer)
else if ($action == "setabsolutediscount" && $user->rights->facture->creer)
{
// POST[remise_id] ou POST[remise_id_for_payment]
if (! empty($_POST["remise_id"]))
@ -322,14 +313,14 @@ if ($action == "setabsolutediscount" && $user->rights->facture->creer)
}
}
if ($action == 'set_ref_client')
else if ($action == 'set_ref_client')
{
$object->fetch($id);
$object->set_ref_client($_POST['ref_client']);
}
// Classify to validated
if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->valider)
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->valider)
{
$idwarehouse=GETPOST('idwarehouse');
@ -376,7 +367,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->v
}
// Go back to draft status (unvalidate)
if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate))
else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate))
{
$idwarehouse=GETPOST('idwarehouse');
@ -449,13 +440,13 @@ if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS
}
// Classify "paid"
if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->facture->paiement)
else if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->facture->paiement)
{
$object->fetch($id);
$result = $object->set_paid($user);
}
// Classif "paid partialy"
if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement)
else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement)
{
$object->fetch($id);
$close_code=$_POST["close_code"];
@ -470,7 +461,7 @@ if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->f
}
}
// Classify "abandoned"
if ($action == 'confirm_canceled' && $confirm == 'yes')
else if ($action == 'confirm_canceled' && $confirm == 'yes')
{
$object->fetch($id);
$close_code=$_POST["close_code"];
@ -486,7 +477,7 @@ if ($action == 'confirm_canceled' && $confirm == 'yes')
}
// Convertir en reduc
if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->facture->creer)
else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->facture->creer)
{
$db->begin();
@ -561,7 +552,7 @@ if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->f
/*
* Insert new invoice in database
*/
if ($action == 'add' && $user->rights->facture->creer)
else if ($action == 'add' && $user->rights->facture->creer)
{
$object->socid=GETPOST('socid','int');
@ -922,7 +913,7 @@ if ($action == 'add' && $user->rights->facture->creer)
}
// Add a new line
if (($action == 'addline' || $action == 'addline_predef') && $user->rights->facture->creer)
else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->facture->creer)
{
$result=0;
@ -1130,7 +1121,7 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact
$action='';
}
if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save'))
else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save'))
{
if (! $object->fetch($id) > 0) dol_print_error($db);
$object->fetch_thirdparty();
@ -1218,15 +1209,14 @@ if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save']
}
}
if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['cancel'] == $langs->trans('Cancel'))
else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['cancel'] == $langs->trans('Cancel'))
{
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // Pour reaffichage de la fiche en cours d'edition
exit;
}
// Modify line position (up)
if ($action == 'up' && $user->rights->facture->creer)
else if ($action == 'up' && $user->rights->facture->creer)
{
$object->fetch($id);
$object->fetch_thirdparty();
@ -1248,7 +1238,7 @@ if ($action == 'up' && $user->rights->facture->creer)
exit;
}
// Modify line position (down)
if ($action == 'down' && $user->rights->facture->creer)
else if ($action == 'down' && $user->rights->facture->creer)
{
$object->fetch($id);
$object->fetch_thirdparty();
@ -1478,7 +1468,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
/*
* Generate document
*/
if (GETPOST('action') == 'builddoc') // En get ou en post
else if ($action == 'builddoc') // En get ou en post
{
$object->fetch($id);
$object->fetch_thirdparty();

View File

@ -2686,93 +2686,6 @@ class Facture extends CommonObject
}
}
/**
* Change les conditions de reglement de la facture
*
* @param int $cond_reglement_id Id de la nouvelle condition de reglement
* @param date $date Date to force payment term
* @return int >0 si ok, <0 si ko
* TODO deprecated, not used
*/
function cond_reglement($cond_reglement_id,$date='')
{
if ($this->statut >= 0 && $this->paye == 0)
{
// Define cond_reglement_id and datelim
if (strval($date) != '')
{
$datelim=$date;
$cond_reglement_id=0;
}
else
{
$datelim=$this->calculate_date_lim_reglement($cond_reglement_id);
$cond_reglement_id=$cond_reglement_id;
}
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
$sql.= ' SET fk_cond_reglement = '.$cond_reglement_id.',';
$sql.= ' date_lim_reglement='.$this->db->idate($datelim);
$sql.= ' WHERE rowid='.$this->id;
dol_syslog(get_class($this)."::cond_reglement sql=".$sql, LOG_DEBUG);
if ( $this->db->query($sql) )
{
$this->cond_reglement_id = $cond_reglement_id;
return 1;
}
else
{
dol_syslog(get_class($this)."::cond_reglement Erreur ".$sql.' - '.$this->db->error());
$this->error=$this->db->error();
return -1;
}
}
else
{
dol_syslog(get_class($this)."::cond_reglement, etat facture incompatible");
$this->error='Entity status not compatible '.$this->statut.' '.$this->paye;
return -2;
}
}
/**
* Change le mode de reglement
*
* @param int $mode_reglement_id Id du nouveau mode
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function mode_reglement($mode_reglement_id)
{
dol_syslog(get_class($this).'::mode_reglement('.$mode_reglement_id.')', LOG_DEBUG);
if ($this->statut >= 0 && $this->paye == 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
$sql .= ' SET fk_mode_reglement = '.$mode_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->mode_reglement_id = $mode_reglement_id;
return 1;
}
else
{
dol_syslog(get_class($this).'::mode_reglement Erreur '.$sql.' - '.$this->db->error());
$this->error=$this->db->error();
return -1;
}
}
else
{
dol_syslog(get_class($this).'::mode_reglement, etat facture incompatible');
$this->error='Etat facture incompatible '.$this->statut.' '.$this->paye;
return -2;
}
}
/**
* Renvoi si les lignes de facture sont ventilees et/ou exportees en compta
*

View File

@ -942,6 +942,33 @@ abstract class CommonObject
}
}
/**
* Define delivery address
*
* @param int $id Address id
* @return int <0 si ko, >0 si ok
*/
function setDeliveryAddress($id)
{
$fieldname = 'fk_adresse_livraison';
if ($this->element == 'delivery' || $this->element == 'shipping') $fieldname = 'fk_address';
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ".$fieldname." = ".$id;
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
if ($this->db->query($sql))
{
$this->fk_delivery_address = $id;
return 1;
}
else
{
$this->error=$this->db->error();
dol_syslog(get_class($this).'::setDeliveryAddress Erreur '.$sql.' - '.$this->error);
return -1;
}
}
/**
* Set last model used by doc generator
*

View File

@ -733,6 +733,8 @@ class FormOther
function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='')
{
global $langs,$conf;
global $form;
if ($htmlname != "none")
{
print '<form method="post" action="'.$page.'">';
@ -740,7 +742,7 @@ class FormOther
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>';
$this->select_address($selected, $socid, $htmlname, 1);
$form->select_address($selected, $socid, $htmlname, 1);
print '</td>';
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
$langs->load("companies");

View File

@ -40,7 +40,7 @@ function contract_prepare_head($object)
$h++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans("ContractContacts");
$head[$h][1] = $langs->trans("ContactsAddresses");
$head[$h][2] = 'contact';
$h++;

View File

@ -41,7 +41,7 @@ function facturefourn_prepare_head($object)
$h++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('BillContacts');
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;
@ -101,7 +101,7 @@ function ordersupplier_prepare_head($object)
}
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('OrderContact');
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;

View File

@ -40,7 +40,7 @@ function facture_prepare_head($object)
$h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('BillContacts');
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;

View File

@ -69,7 +69,7 @@ function commande_prepare_head($object)
}
$head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('OrderContact');
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;

View File

@ -64,7 +64,7 @@ function propal_prepare_head($object)
}
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ProposalContact');
$head[$h][1] = $langs->trans('ContactsAddresses');
$head[$h][2] = 'contact';
$h++;

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2008 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -19,8 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Code identique a /expedition/shipment.php
/**
* \file htdocs/expedition/fiche.php
* \ingroup expedition
@ -164,7 +162,7 @@ if ($action == 'add')
/*
* Build a receiving receipt
*/
if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)
else if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)
{
$object->fetch($id);
$result = $object->create_delivery($user);
@ -179,7 +177,7 @@ if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->righ
}
}
if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->expedition->valider)
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->expedition->valider)
{
$object->fetch($id);
$object->fetch_thirdparty();
@ -208,7 +206,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->expedition
}
}
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer)
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer)
{
$object->fetch($id);
$result = $object->delete();
@ -223,7 +221,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio
}
}
if ($action == 'reopen' && $user->rights->expedition->valider)
else if ($action == 'reopen' && $user->rights->expedition->valider)
{
$object->fetch($id);
$result = $object->setStatut(0);
@ -233,7 +231,7 @@ if ($action == 'reopen' && $user->rights->expedition->valider)
}
}
if ($action == 'setdate_livraison' && $user->rights->expedition->creer)
else if ($action == 'setdate_livraison' && $user->rights->expedition->creer)
{
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
$datedelivery=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'), GETPOST('liv_year','int'));
@ -247,7 +245,7 @@ if ($action == 'setdate_livraison' && $user->rights->expedition->creer)
}
// Action update description of emailing
if ($action == 'settrackingnumber' || $action == 'settrackingurl'
else if ($action == 'settrackingnumber' || $action == 'settrackingurl'
|| $action == 'settrueWeight'
|| $action == 'settrueWidth'
|| $action == 'settrueHeight'
@ -286,7 +284,7 @@ if ($action == 'settrackingnumber' || $action == 'settrackingurl'
/*
* Build doc
*/
if ($action == 'builddoc') // En get ou en post
else if ($action == 'builddoc') // En get ou en post
{
// Sauvegarde le dernier modele choisi pour generer un document
@ -505,12 +503,20 @@ if ($action == 'send' && ! GETPOST('addfile','alpha') && ! GETPOST('removedfile'
}
}
if ($action == 'classifybilled')
else if ($action == 'classifybilled')
{
$object->fetch($id);
$object->set_billed();
}
else if ($action == 'setaddress' && $user->rights->expedition->creer)
{
$object->fetch($id);
$result=$object->setDeliveryAddress($_POST['fk_address']);
if ($result < 0) dol_print_error($db,$object->error);
}
/*
* View
*/
@ -1036,16 +1042,26 @@ else
print '</tr>';
// Delivery address
if (($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
|| ($origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS))
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS || $conf->global->PROPAL_ADD_DELIVERY_ADDRESS)
{
print '<tr><td>'.$langs->trans('DeliveryAddress').'</td>';
print '<td colspan="3">';
if (!empty($object->fk_delivery_address))
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->deliveryaddress->socid,'none','shipment',$object->id);
}
print '</td></tr>'."\n";
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdelivery_address')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','shipment',$object->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','shipment',$object->id);
}
print '</td></tr>';
}
// Weight

View File

@ -18,15 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Code identique a /expedition/fiche.php
/**
* \file htdocs/expedition/shipment.php
* \ingroup expedition
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php");
require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php");
@ -100,7 +97,7 @@ if ($action == 'setdeliveryaddress' && $user->rights->commande->creer)
{
$commande = new Commande($db);
$commande->fetch($id);
$commande->set_adresse_livraison($user,GETPOST('delivery_address_id','int'));
$commande->setDeliveryAddress(GETPOST('delivery_address_id','int'));
}
if ($action == 'setmode' && $user->rights->commande->creer)
@ -127,7 +124,6 @@ if ($action == 'setconditions' && $user->rights->commande->creer)
$form = new Form($db);
$formfile = new FormFile($db);
$formother = new FormOther($db);
$formproduct = new FormProduct($db);
llxHeader('',$langs->trans('OrderCard'),'');
@ -274,29 +270,6 @@ if ($id > 0 || ! empty($ref))
print '</td>';
print '</tr>';
// Delivery address
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress');
print '</td>';
if ($action != 'editdelivery_adress' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_adress&amp;socid='.$commande->socid.'&amp;id='.$commande->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editdelivery_adress')
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,GETPOST('socid','int'),'delivery_address_id','commande',$commande->id);
}
else
{
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,GETPOST('socid','int'),'none','commande',$commande->id);
}
print '</td></tr>';
}
// Terms of payment
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';

View File

@ -1300,76 +1300,6 @@ class CommandeFournisseur extends Commande
}
}
/**
* Change les conditions de reglement de la commande
*
* @param int $cond_reglement_id Id de la nouvelle condition de reglement
* @return int >0 si ok, <0 si ko
* TODO deprecated
*/
function cond_reglement($cond_reglement_id)
{
dol_syslog('CommandeFournisseur::cond_reglement('.$cond_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur';
$sql .= ' SET fk_cond_reglement = '.$cond_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->cond_reglement_id = $cond_reglement_id;
return 1;
}
else
{
dol_syslog('CommandeFournisseur::cond_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('CommandeFournisseur::cond_reglement, etat commande incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Change le mode de reglement
*
* @param int $mode_reglement_id Id du nouveau mode
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function mode_reglement($mode_reglement_id)
{
dol_syslog('CommandeFournisseur::mode_reglement('.$mode_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur';
$sql .= ' SET fk_mode_reglement = '.$mode_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->mode_reglement_id = $mode_reglement_id;
return 1;
}
else
{
dol_syslog('CommandeFournisseur::mode_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('CommandeFournisseur::mode_reglement, etat commande incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Set a delivery in database for this supplier order
*

View File

@ -51,8 +51,7 @@ CustomersInvoices=العملاء والفواتير
SupplierInvoice=فاتورة المورد
SuppliersInvoices=الموردين
SupplierBill=فاتورة المورد
SupplierBills=فواتير الموردين
BillContacts=فاتورة الاتصالات
SupplierBills=فاتورة الاتصالات
Payment=الدفع
PaymentBack=دفع العودة
Payments=المدفوعات

View File

@ -30,7 +30,6 @@ ServiceStatusClosed=مغلقة
ServicesLegend=خدمات أسطورة
Contracts=عقود
Contract=العقد
ContractContacts=عقد اتصالات
NoContracts=أي عقود
MenuServices=الخدمات
MenuInactiveServices=الخدمات غير الفعالة

View File

@ -16,7 +16,6 @@ Order=ترتيب
Orders=أوامر
OrderLine=من أجل خط
OrderFollow=متابعة
OrderContact=من أجل الاتصال
OrderDate=من أجل التاريخ
NewOrder=النظام الجديد
ToOrder=ومن أجل جعل

View File

@ -18,7 +18,6 @@ ProposalsOpened=افتتح مقترحات تجارية
Prop=مقترحات تجارية
CommercialProposal=اقتراح التجارية
CommercialProposals=مقترحات تجارية
ProposalContact=اقتراح الاتصال
NewProp=التجاري الجديد المقترح
NewProposal=التجاري الجديد المقترح
NewPropal=اقتراح جديد

View File

@ -50,7 +50,6 @@ SupplierInvoice=Factura de proveïdor
SuppliersInvoices=Factures de proveïdors
SupplierBill=Factura de proveïdor
SupplierBills=Factures de proveïdors
BillContacts=Contactes factura
Payment=Pagament
PaymentBack=Reembossament
Payments=Pagaments

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Tancat
ServicesLegend=Llegenda per als serveis
Contracts=Contractes
Contract=Contracte
ContractContacts=Contactes contracte
NoContracts=Sense contractes
MenuServices=Serveis
MenuInactiveServices=Serveis inactius

View File

@ -7,7 +7,6 @@ Order=Comanda
Orders=Comandes
OrderLine=Línia de comanda
OrderFollow=Seguiment
OrderContact=Contactes comanda
OrderDate=Data comanda
OrderToProcess=Comanda a processar
NewOrder=Nova comanda

View File

@ -10,7 +10,6 @@ CommercialProposal=Pressupost
CommercialProposals=Pressupostos
ProposalsOpened=Pressupostos oberts
ProposalCard=Fitxa pressupost
ProposalContact=Contacte pressupost
NewProp=Nou pressupost
NewProposal=Nou pressupost
NewPropal=Nou pressupost

View File

@ -47,7 +47,6 @@ SupplierInvoice=Leverandør faktura
SuppliersInvoices=Leverandørernes fakturaer
SupplierBill=Leverandør faktura
SupplierBills=leverandører fakturaer
BillContacts=Faktura kontakter
Payment=Betaling
PaymentBack=Betaling tilbage
Payments=Betalinger

View File

@ -29,7 +29,6 @@ ServiceStatusClosed=Lukket
ServicesLegend=Services legend
Contracts=Kontrakter
Contract=Kontrakt
ContractContacts=Kontrakt kontakter
NoContracts=Nr. kontrakter
MenuServices=Services
MenuInactiveServices=Tjenester, der ikke er aktive

View File

@ -17,7 +17,6 @@ OrderCard=Bestil kort
Order=Rækkefølge
Orders=Ordrer
OrderFollow=Opfølgning
OrderContact=Bestil kontakt
OrderDate=Bestil dato
NewOrder=Ny ordre
ToOrder=Foretag orden

View File

@ -19,7 +19,6 @@ ProposalsOpened=Åbnet kommercielle forslag
Prop=Kommerciel forslag
CommercialProposal=Kommerciel forslag
CommercialProposals=Kommerciel forslag
ProposalContact=Forslag kontakt
NewProp=Nye kommercielle forslag
NewProposal=Nye kommercielle forslag
NewPropal=Nyt forslag

View File

@ -42,7 +42,6 @@ SupplierInvoice=Lieferantenrechnung
SuppliersInvoices=Lieferantenrechnungen
SupplierBill=Lieferantenrechnung
SupplierBills=Lieferantenrechnungen
BillContacts=Rechnungskontakte
Payment=Zahlung
PaymentBack=Rückzahlung
Payments=Zahlungen

View File

@ -24,7 +24,6 @@ ServiceStatusClosed=Geschlossen
ServicesLegend=Services Legende
Contracts=Verträge
Contract=Vertrag
ContractContacts=Vertragskontakt
NoContracts=Keine Verträge
MenuServices=Services
MenuInactiveServices=Inaktive Services

View File

@ -12,7 +12,6 @@ OrderCard=Bestell-Karte
Order=Bestellung
Orders=Bestellungen
OrderFollow=Follow-up
OrderContact=Bestellkontakt
OrderDate=Bestelldatum
NewOrder=Neue Bestellung
ToOrder=Erzeuge Bestellung

View File

@ -14,7 +14,6 @@ ProposalsOpened=Offene Angebote
Prop=Angebot
CommercialProposal=Angebot
CommercialProposals=Angebote
ProposalContact=Angebotskontakt
NewProp=Neues Angebot
NewProposal=Neues Angebot
NewPropal=Neues Angebot

View File

@ -42,7 +42,6 @@ SupplierInvoice=Lieferantenrechnung
SuppliersInvoices=Lieferantenrechnungen
SupplierBill=Lieferantenrechnung
SupplierBills=Lieferantenrechnungen
BillContacts=Rechnungskontakte
Payment=Zahlung
PaymentBack=Rückzahlung
Payments=Zahlungen

View File

@ -24,7 +24,6 @@ ServiceStatusClosed=Geschlossen
ServicesLegend=Services Legende
Contracts=Verträge
Contract=Vertrag
ContractContacts=Vertragskontakt
NoContracts=Keine Verträge
MenuServices=Services
MenuInactiveServices=Inaktive Services

View File

@ -12,7 +12,6 @@ OrderCard=Bestell-Karte
Order=Bestellung
Orders=Bestellungen
OrderFollow=Follow-up
OrderContact=Bestellkontakt
OrderDate=Bestelldatum
NewOrder=Neue Bestellung
ToOrder=Erzeuge Bestellung

View File

@ -14,7 +14,6 @@ ProposalsOpened=Offene Angebote
Prop=Angebot
CommercialProposal=Angebot
CommercialProposals=Angebote
ProposalContact=Angebotskontakt
NewProp=Neues Angebot
NewProposal=Neues Angebot
NewPropal=Neues Angebot

View File

@ -50,7 +50,6 @@ SupplierInvoice=Τιμολόγιο Προμηθευτή
SuppliersInvoices=Τιμολόγια Προμηθευτή
SupplierBill=Τιμολόγιο Προμηθευτή
SupplierBills=Τιμολόγια Προμηθευτή
BillContacts=Πρόσωπο Επικοινωνίας
Payment=Πληρωμή
PaymentBack=Payment back
Payments=Πληρωμές

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Τερματισμένη
ServicesLegend=Services legend
Contracts=Συμβόλαια
Contract=Συμβόλαιο
ContractContacts=Contract contacts
NoContracts=Κανένα Συμβόλαιο
MenuServices=Υπηρεσίες
MenuInactiveServices=Ανενεργές Υπηρεσίες

View File

@ -7,7 +7,6 @@ Order=Παραγγελία
Orders=Παραγγελίες
OrderLine=Γραμμή Παραγγελίας
OrderFollow=Follow up
OrderContact=Πρόσωπο Επικοιν. παραγγελίας
OrderDate=Ημερομηνία παραγγελίας
OrderToProcess=Παραγγελία προς επεξεργασία
NewOrder=Νέα παραγγελία

View File

@ -10,7 +10,6 @@ Prop=Εμπορικές προτάσεις
CommercialProposal=Εμπορική πρόταση
CommercialProposals=Εμπορικές προτάσεις
ProposalCard=Καρτέλα πρότασης
ProposalContact=Αντιπρόσωπος πρότασης
NewProp=Νέα εμπορική πρόταση
NewProposal=Νέα εμπορική πρόταση
NewPropal=Νέα πρόταση

View File

@ -10,7 +10,6 @@ Prop=Quotations
CommercialProposal=Quotation
CommercialProposals=Quotations
ProposalCard=Quotation card
ProposalContact=Quotation contact
NewProp=New quotation
NewProposal=New quotation
NewPropal=New quotation

View File

@ -54,7 +54,6 @@ SupplierInvoice=Supplier invoice
SuppliersInvoices=Supplier's invoices
SupplierBill=Supplier invoice
SupplierBills=suppliers invoices
BillContacts=Invoice contacts
Payment=Payment
PaymentBack=Payment back
Payments=Payments

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Closed
ServicesLegend=Services legend
Contracts=Contracts
Contract=Contract
ContractContacts=Contract contacts
NoContracts=No contracts
MenuServices=Services
MenuInactiveServices=Services not active

View File

@ -7,7 +7,6 @@ Order=Order
Orders=Orders
OrderLine=Order line
OrderFollow=Follow up
OrderContact=Order contact
OrderDate=Order date
OrderToProcess=Order to process
NewOrder=New order

View File

@ -10,7 +10,6 @@ Prop=Commercial proposals
CommercialProposal=Commercial proposal
CommercialProposals=Commercial proposals
ProposalCard=Proposal card
ProposalContact=Proposal contact
NewProp=New commercial proposal
NewProposal=New commercial proposal
NewPropal=New proposal

View File

@ -50,7 +50,6 @@ SupplierInvoice=Factura de proveedor
SuppliersInvoices=Facturas de proveedores
SupplierBill=Factura de proveedor
SupplierBills=Facturas de proveedores
BillContacts=Contactos factura
Payment=Pago
PaymentBack=Reembolso
Payments=Pagos

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Cerrado
ServicesLegend=Leyenda para los servicios
Contracts=Contratos
Contract=Contrato
ContractContacts=Contactos contrato
NoContracts=Sin contratos
MenuServices=Servicios
MenuInactiveServices=Servicios inactivos

View File

@ -7,7 +7,6 @@ Order=Pedido
Orders=Pedidos
OrderLine=Línea de pedido
OrderFollow=Seguimiento
OrderContact=Contactos pedido
OrderDate=Fecha pedido
OrderToProcess=Pedido a procesar
NewOrder=Nuevo pedido

View File

@ -10,7 +10,6 @@ CommercialProposal=Presupuesto
CommercialProposals=Presupuestos
ProposalsOpened=Presupuestos abiertos
ProposalCard=Ficha presupuesto
ProposalContact=Contacto presupuesto
NewProp=Nuevo presupuesto
NewProposal=Nuevo presupuesto
NewPropal=Nuevo presupuesto

View File

@ -62,7 +62,6 @@ SupplierInvoice=Tarnija arve
SuppliersInvoices=Tarnija arved
SupplierBill=Tarnija arve
SupplierBills=tarnijate arvete
BillContacts=Arve kontaktid
Payment=Makse
PaymentBack=Makse tagasi
Payments=Maksed

View File

@ -29,7 +29,6 @@ ServiceStatusClosed=Suletud
ServicesLegend=Teenused legend
Contracts=Lepingud
Contract=Leping
ContractContacts=Leping kontaktid
NoContracts=Lepinguid
MenuServices=Teenused
MenuInactiveServices=Teenused ole aktiivne

View File

@ -15,7 +15,6 @@ Order=Et
Orders=Tellimused
OrderLine=Et liini
OrderFollow=Järelmeetmed
OrderContact=Selleks kontakt
OrderDate=Selleks kuupäevaks
OrderToProcess=Selleks, et protsess
NewOrder=New et

View File

@ -18,7 +18,6 @@ Prop=Commercial ettepanekuid
CommercialProposal=Commercial ettepanek
CommercialProposals=Commercial ettepanekuid
ProposalCard=Ettepanek kaart
ProposalContact=Ettepanek kontakt
NewProp=Uus äri-ettepanekut
NewProposal=Uus äri-ettepanekut
NewPropal=Uus ettepanek

View File

@ -51,8 +51,7 @@ CustomersInvoices=العملاء والفواتير
SupplierInvoice=فاتورة المورد
SuppliersInvoices=الموردين
SupplierBill=فاتورة المورد
SupplierBills=فواتير الموردين
BillContacts=فاتورة الاتصالات
SupplierBills=فاتورة الاتصالات
Payment=الدفع
PaymentBack=دفع العودة
Payments=المدفوعات

View File

@ -30,7 +30,6 @@ ServiceStatusClosed=مغلقة
ServicesLegend=خدمات أسطورة
Contracts=عقود
Contract=العقد
ContractContacts=عقد اتصالات
NoContracts=أي عقود
MenuServices=الخدمات
MenuInactiveServices=الخدمات غير الفعالة

View File

@ -16,7 +16,6 @@ Order=ترتيب
Orders=أوامر
OrderLine=من أجل خط
OrderFollow=متابعة
OrderContact=من أجل الاتصال
OrderDate=من أجل التاريخ
NewOrder=النظام الجديد
ToOrder=ومن أجل جعل

View File

@ -18,7 +18,6 @@ ProposalsOpened=افتتح مقترحات تجارية
Prop=مقترحات تجارية
CommercialProposal=اقتراح التجارية
CommercialProposals=مقترحات تجارية
ProposalContact=اقتراح الاتصال
NewProp=التجاري الجديد المقترح
NewProposal=التجاري الجديد المقترح
NewPropal=اقتراح جديد

View File

@ -45,7 +45,6 @@ SupplierInvoice=Toimittajan laskun
SuppliersInvoices=Tavarantoimittajat laskujen
SupplierBill=Toimittajan laskun
SupplierBills=tavarantoimittajien laskut
BillContacts=Laskun yhteystiedot
Payment=Maksu
PaymentBack=Maksun
Payments=Maksut

View File

@ -27,7 +27,6 @@ ServiceStatusClosed=Suljettu
ServicesLegend=Palvelut legenda
Contracts=Sopimukset
Contract=Sopimus
ContractContacts=Sopimus yhteystiedot
NoContracts=Sopimuksia ei
MenuServices=Palvelut
MenuInactiveServices=Palvelut, joita ei aktiivinen

View File

@ -15,7 +15,6 @@ OrderCard=Tilaa kortti
Order=Tilata
Orders=Tilaukset
OrderFollow=Seuranta
OrderContact=Tilaa yhteyttä
OrderDate=Tilaa päivämäärä
NewOrder=Uusi järjestys
ToOrder=Tee jotta

View File

@ -17,7 +17,6 @@ ProposalsOpened=Avoinna kaupallinen ehdotuksia
Prop=Kaupalliset ehdotuksia
CommercialProposal=Kaupalliset ehdotus
CommercialProposals=Kaupalliset ehdotuksia
ProposalContact=Ehdotus yhteyttä
NewProp=Uusia kaupallisia ehdotus
NewProposal=Uusia kaupallisia ehdotus
NewPropal=Uusi ehdotus

View File

@ -50,7 +50,6 @@ SupplierInvoice=Facture fournisseur
SuppliersInvoices=Factures fournisseurs
SupplierBill=Facture fournisseur
SupplierBills=Factures fournisseurs
BillContacts=Contacts facture
Payment=Règlement
PaymentBack=Remboursement
Payments=Règlements

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Fermé
ServicesLegend=Légende pour les services
Contracts=Contrats
Contract=Contrat
ContractContacts=Contacts contrat
NoContracts=Pas de contrats
MenuServices=Services
MenuInactiveServices=Services inactifs

View File

@ -7,7 +7,6 @@ Order=Commande
Orders=Commandes
OrderLine=Ligne de commande
OrderFollow=Suivi
OrderContact=Contacts commande
OrderDate=Date commande
OrderToProcess=Commande à traiter
NewOrder=Nouvelle commande

View File

@ -10,7 +10,6 @@ CommercialProposal=Proposition commerciale
CommercialProposals=Propositions commerciales
ProposalsOpened=Propositions commerciales ouvertes
ProposalCard=Fiche proposition
ProposalContact=Contact proposition
NewProp=Nouvelle proposition commerciale
NewProposal=Nouvelle proposition commerciale
NewPropal=Nouvelle proposition

View File

@ -61,8 +61,7 @@ CustomersInvoices=לקוחות של חשבוניות
SupplierInvoice=חשבונית הספק
SuppliersInvoices=הספק של חשבוניות
SupplierBill=חשבונית הספק
SupplierBills=חשבוניות ספקים
BillContacts=חשבונית אנשי קשר
SupplierBills=חשבונית אנשי קשר
Payment=תשלום
PaymentBack=תשלום בחזרה
Payments=תשלומים

View File

@ -29,7 +29,6 @@ ServiceStatusClosed=סגור
ServicesLegend=שירותי אגדה
Contracts=חוזים
Contract=חוזה
ContractContacts=חוזה אנשי קשר
NoContracts=אין חוזים
MenuServices=שירותים
MenuInactiveServices=לא פעילים שירותים

View File

@ -15,7 +15,6 @@ Order=סדר
Orders=הזמנות
OrderLine=צו קו
OrderFollow=מעקב
OrderContact=סדר קשר
OrderDate=סדר מועד
OrderToProcess=כדי לעבד
NewOrder=חדש הסדר

View File

@ -18,7 +18,6 @@ Prop=הצעות מסחריות
CommercialProposal=מסחרי ההצעה
CommercialProposals=הצעות מסחריות
ProposalCard=הצעת כרטיס
ProposalContact=ההצעה קשר
NewProp=ההצעה מסחריים חדשים
NewProposal=ההצעה מסחריים חדשים
NewPropal=הצעה חדשה

View File

@ -62,7 +62,6 @@ SupplierInvoice=Szállító számlát
SuppliersInvoices=Szállító számlák
SupplierBill=Szállító számlát
SupplierBills=beszállítói számlák
BillContacts=Számla kapcsolatok
Payment=Fizetés
PaymentBack=Fizetési vissza
Payments=Kifizetések

View File

@ -21,7 +21,6 @@ ServiceStatusClosed=Lezárva
ServicesLegend=Szolgáltatások magyarázat
Contracts=Szerződések
Contract=Szerződés
ContractContacts=Szerződés kapcsolattartói
NoContracts=Nincs szerződés
MenuServices=Szolgáltatás
MenuInactiveServices=Nincs aktív szolgáltatás

View File

@ -15,7 +15,6 @@ Order=Megrendelés
Orders=Megrendelés
OrderLine=Rendelés vonal
OrderFollow=Nyomon követés
OrderContact=Megrendelés Kapcsolat
OrderDate=Rendezés dátum
OrderToProcess=Feldolgozása érdekében
NewOrder=Új megbízás

View File

@ -18,7 +18,6 @@ Prop=Üzleti ajánlatok
CommercialProposal=Üzleti ajánlat
CommercialProposals=Üzleti ajánlatok
ProposalCard=Javaslat kártya
ProposalContact=Javaslat Kapcsolat
NewProp=Új kereskedelmi javaslat
NewProposal=Új kereskedelmi javaslat
NewPropal=Új javaslat

View File

@ -58,7 +58,6 @@ SupplierInvoice=Birgir Reikningar
SuppliersInvoices=reikningum birgis
SupplierBill=Birgir Reikningar
SupplierBills=birgjum reikninga
BillContacts=Invoice tengiliðir
Payment=Greiðsla
PaymentBack=Greiðsla til baka
Payments=Greiðslur

View File

@ -29,7 +29,6 @@ ServiceStatusClosed=Loka
ServicesLegend=Þjónusta þjóðsaga
Contracts=Samningar
Contract=Samningur
ContractContacts=Samningur tengiliðir
NoContracts=Engir samningar
MenuServices=Þjónusta
MenuInactiveServices=Þjónusta ekki virk

View File

@ -15,7 +15,6 @@ Order=Panta
Orders=Pantanir
OrderLine=Pöntunarlína
OrderFollow=Eftirfylgni
OrderContact=Panta samband
OrderDate=Panta dagsetningu
OrderToProcess=Til að framkvæma
NewOrder=New Order

View File

@ -17,7 +17,6 @@ ProposalsOpened=Opnaður auglýsing tillögur
Prop=Auglýsing tillögur
CommercialProposal=Auglýsing tillögu
CommercialProposals=Auglýsing tillögur
ProposalContact=Tillaga samband
NewProp=Ný auglýsing tillögu
NewProposal=Ný auglýsing tillögu
NewPropal=Ný tillaga

View File

@ -40,7 +40,6 @@ SupplierInvoice =Fattura del fornitore
SuppliersInvoices =Fatture dei fornitori
SupplierBill =Fattura del fornitore
SupplierBills =Fatture dei fornitori
BillContacts =Contatti fattura
Payment =Pagamento
PaymentBack =Rimborso
Payments =Pagamenti

View File

@ -18,7 +18,6 @@ ServiceStatusClosed =Chiuso
ServicesLegend =Servizi leggenda
Contracts =Contratti per servizi
Contract =Contratto per servizi
ContractContacts =Contatti del contratto per servizi
MenuServices =Servizi
MenuInactiveServices =Servizi non attivi
MenuRunningServices =Servizi in esecuzione

View File

@ -5,8 +5,7 @@ SuppliersOrdersArea =Sezione ordini fornitori
OrderCard =Scheda ordine
Order =Ordine
Orders =Ordini
OrderFollow =Follow-up
OrderContact =Contatto ordine
OrderFollow =Follow-up
OrderDate =Data ordine
NewOrder =Nuovo ordine
ToOrder =Richiedere ordine

View File

@ -8,7 +8,6 @@ ProposalsOpened =Proposte commerciali aperte
Prop =Preventivi/Prop. commerciali
CommercialProposal =Preventivo/Proposta commerciale
CommercialProposals =Preventivi/Proposte commerciali
ProposalContact =Contatto della proposta
NewProp =Nuova proposta commerciale
NewProposal =Nuova proposta commerciale
NewPropal =Nuova proposta

View File

@ -62,7 +62,6 @@ SupplierInvoice=サプライヤーの請求書
SuppliersInvoices=仕入先の請求書
SupplierBill=サプライヤーの請求書
SupplierBills=仕入先の請求書
BillContacts=請求書の連絡先
Payment=支払い
PaymentBack=戻って支払い
Payments=支払い

View File

@ -23,7 +23,6 @@ ServiceStatusClosed=閉じ
ServicesLegend=サービス伝説
Contracts=契約
Contract=契約
ContractContacts=契約担当者
NoContracts=いいえ契約なし
MenuServices=サービス
MenuInactiveServices=アクティブでないサービス

View File

@ -15,7 +15,6 @@ Order=オーダー
Orders=受注
OrderLine=注文明細行
OrderFollow=フォローアップ
OrderContact=ご注文お問い合わせ
OrderDate=注文日
OrderToProcess=プロセスの順序
NewOrder=新規注文

View File

@ -18,7 +18,6 @@ Prop=商用の提案
CommercialProposal=商業的提案
CommercialProposals=商用の提案
ProposalCard=提案カード
ProposalContact=提案の連絡先
NewProp=新しい商業提案
NewProposal=新しい商業提案
NewPropal=新たな提案

View File

@ -41,7 +41,6 @@ SupplierInvoice=Leverandørfaktura
SuppliersInvoices=Leverandørfakturaer
SupplierBill=Leverandørfaktura
SupplierBills=Leverandørfakturaer
BillContacts=Fakturakontakter
Payment=Betaling
PaymentBack=Betaling tilbake
Payments=Betalinger

View File

@ -17,7 +17,6 @@ ServiceStatusClosed=Lukket
ServicesLegend=Tjeneste legend
Contracts=Kontrakter
Contract=Kontrakt
ContractContacts=Kontaktperson for kontrakten
NoContracts=Ingen kontrakter
MenuServices=Tjenester
MenuInactiveServices=Ikke aktive tjenester

View File

@ -6,7 +6,6 @@ OrderCard=Ordrekort
Order=Ordre
Orders=Ordre
OrderFollow=Oppfølging
OrderContact=Kontaktperson
OrderDate=Ordredato
NewOrder=Ny ordre
ToOrder=Lag ordre

View File

@ -8,7 +8,6 @@ ProposalsOpened=Åpnede tilbud
Prop=Tilbud
CommercialProposal=Tilbud
CommercialProposals=Tilbud
ProposalContact=Tilbudskontakt
NewProp=Nytt tilbud
NewProposal=Nytt tilbud
NewPropal=Nytt tilbud

View File

@ -34,7 +34,6 @@ SupplierInvoice=Leveranciers factuur
SuppliersInvoices=Leveranciers facturen
SupplierBill=Factuur leverancier
SupplierBills=Facturen leveranciers
BillContacts=Factuur contacten
Payment=Betaling
Payments=Betalingen
ReceivedPayments=Ontvangen betalingen

View File

@ -19,7 +19,6 @@ ServiceStatusClosed=Gesloten
ServicesLegend=Legende diensten
Contracts=Contracten
Contract=Contract
ContractContacts=Contract contacten
NoContracts=Geen contracten
MenuServices=Diensten
MenuInactiveServices=Diensten niet actief

View File

@ -5,7 +5,6 @@ OrderCard=Bestellingskaart
Order=Bestelling
Orders=Bestellingen
OrderFollow=Opvolging
OrderContact=Bestellings contact
OrderDate=Bestellingsdatum
NewOrder=Nieuwe bestelling
ToOrder=Naar bestelling

View File

@ -8,7 +8,6 @@ ProposalsOpened=Geopende offertes
Prop=Offertes
CommercialProposal=Offerte
CommercialProposals=Offertes
ProposalContact=Voorstel contact
NewProp=Nieuwe offerte
NewProposal=Nieuwe offerte
NewPropal=Nieuwe offerte

View File

@ -50,7 +50,6 @@ SupplierInvoice = Leveranciersfactuur
SuppliersInvoices = Leveranciersfacturen
SupplierBill = Leveranciersfactuur
SupplierBills = leveranciersfacturen
BillContacts = Factuurcontacten
Payment = Betaling
PaymentBack = Terugbetaling
Payments = Betalingen

View File

@ -21,7 +21,6 @@ ServiceStatusClosed = Gesloten
ServicesLegend = Dienstenlegenda
Contracts = Contracten
Contract = Contract
ContractContacts = Contractcontactpersonen
NoContracts = Geen contracten
MenuServices = Diensten
MenuInactiveServices = Inactieve diensten

Some files were not shown because too many files have changed in this diff Show More