Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2ccf9462e4
@ -94,6 +94,34 @@ if ($action == "save" && empty($cancel))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preg_match('/set_(.*)/',$action,$reg))
|
||||||
|
{
|
||||||
|
$code=$reg[1];
|
||||||
|
$value=(GETPOST($code) ? GETPOST($code) : 1);
|
||||||
|
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match('/del_(.*)/',$action,$reg))
|
||||||
|
{
|
||||||
|
$code=$reg[1];
|
||||||
|
if (dolibarr_del_const($db, $code, $conf->entity) > 0)
|
||||||
|
{
|
||||||
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,6 +187,46 @@ print "</form>\n";
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Other options
|
||||||
|
*/
|
||||||
|
|
||||||
|
print_titre($langs->trans("OtherOptions"));
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
print '<table class="noborder allwidth">'."\n";
|
||||||
|
print '<tr class="liste_titre">'."\n";
|
||||||
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
|
print '<td align="center" width="20"> </td>'."\n";
|
||||||
|
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
// Manual or automatic
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>'."\n";
|
||||||
|
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
|
||||||
|
print '<td align="center" width="20"> </td>'."\n";
|
||||||
|
|
||||||
|
print '<td align="center" width="100">'."\n";
|
||||||
|
if ($conf->use_javascript_ajax)
|
||||||
|
{
|
||||||
|
print ajax_constantonoff('AGENDA_USE_EVENT_TYPE');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
|
}
|
||||||
|
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|||||||
@ -55,16 +55,10 @@ if ($prev_id)
|
|||||||
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
|
||||||
|
|
||||||
$relativepath = 'receipts/'.$bon->ref;
|
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
@ -92,7 +86,16 @@ if ($prev_id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||||
|
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -54,16 +54,10 @@ if ($prev_id)
|
|||||||
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
|
||||||
|
|
||||||
$relativepath = 'receipts/'.$bon->ref;
|
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
@ -91,7 +85,16 @@ if ($prev_id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||||
|
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,13 +58,6 @@ if ($prev_id)
|
|||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
|
||||||
|
|
||||||
$relativepath = 'receipts/'.$bon->ref;
|
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
@ -92,7 +85,16 @@ if ($prev_id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||||
|
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -65,13 +65,6 @@ if ($prev_id)
|
|||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
|
||||||
|
|
||||||
$relativepath = 'receipts/'.$bon->ref;
|
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
@ -99,7 +92,16 @@ if ($prev_id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '<br>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||||
|
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -889,7 +889,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
dol_syslog(get_class($this)."::commande sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::commande sql=".$sql, LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$result = 0;
|
$result = 1;
|
||||||
$this->log($user, 3, $date, $comment);
|
$this->log($user, 3, $date, $comment);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -81,8 +81,14 @@ $object = new CommandeFournisseur($db);
|
|||||||
// Load object
|
// Load object
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$object->fetch($id, $ref);
|
$resObj = $object->fetch($id, $ref);
|
||||||
$object->fetch_thirdparty();
|
$resTP = $object->fetch_thirdparty();
|
||||||
|
if ($resObj < 0) dol_print_error($db,$object->error);
|
||||||
|
if ($resTP < 0) dol_print_error($db,$object->error);
|
||||||
|
} else if($socid) {
|
||||||
|
$object->socid = $socid;
|
||||||
|
$resTP = $object->fetch_thirdparty();
|
||||||
|
if ($resTP < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -111,7 +117,6 @@ if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->cree
|
|||||||
{
|
{
|
||||||
$datelivraison=dol_mktime(0, 0, 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
|
$datelivraison=dol_mktime(0, 0, 0, GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
|
||||||
|
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->set_date_livraison($user,$datelivraison);
|
$result=$object->set_date_livraison($user,$datelivraison);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -132,21 +137,18 @@ else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->
|
|||||||
|
|
||||||
else if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'setnote' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver)
|
else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
|
||||||
if (in_array($object->statut, array(1, 5, 6, 7, 9)))
|
if (in_array($object->statut, array(1, 5, 6, 7, 9)))
|
||||||
{
|
{
|
||||||
if ($object->statut == 1) $newstatus=0; // Validated->Draft
|
if ($object->statut == 1) $newstatus=0; // Validated->Draft
|
||||||
@ -205,9 +207,6 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
|||||||
|
|
||||||
if (! $error && ((GETPOST('qty') || GETPOST('pqty')) && ((GETPOST('pu') && (GETPOST('np_desc') || GETPOST('dp_desc'))) || GETPOST('idprodfournprice'))))
|
if (! $error && ((GETPOST('qty') || GETPOST('pqty')) && ((GETPOST('pu') && (GETPOST('np_desc') || GETPOST('dp_desc'))) || GETPOST('idprodfournprice'))))
|
||||||
{
|
{
|
||||||
if ($object->fetch($id) < 0) dol_print_error($db,$object->error);
|
|
||||||
if ($object->fetch_thirdparty() < 0) dol_print_error($db,$object->error);
|
|
||||||
|
|
||||||
// Ecrase $pu par celui du produit
|
// Ecrase $pu par celui du produit
|
||||||
// Ecrase $desc par celui du produit
|
// Ecrase $desc par celui du produit
|
||||||
// Ecrase $txtva par celui du produit
|
// Ecrase $txtva par celui du produit
|
||||||
@ -339,9 +338,6 @@ else if ($action == 'updateligne' && $user->rights->fournisseur->commande->creer
|
|||||||
if ($product->fetch($_POST["elrowid"]) < 0) dol_print_error($db);
|
if ($product->fetch($_POST["elrowid"]) < 0) dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->fetch($id) < 0) dol_print_error($db,$object->error);
|
|
||||||
if ($object->fetch_thirdparty() < 0) dol_print_error($db,$object->error);
|
|
||||||
|
|
||||||
$localtax1_tx=get_localtax($_POST['tva_tx'],1,$object->thirdparty);
|
$localtax1_tx=get_localtax($_POST['tva_tx'],1,$object->thirdparty);
|
||||||
$localtax2_tx=get_localtax($_POST['tva_tx'],2,$object->thirdparty);
|
$localtax2_tx=get_localtax($_POST['tva_tx'],2,$object->thirdparty);
|
||||||
|
|
||||||
@ -413,8 +409,6 @@ else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->r
|
|||||||
|
|
||||||
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fournisseur->commande->valider)
|
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fournisseur->commande->valider)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$object->date_commande=dol_now();
|
$object->date_commande=dol_now();
|
||||||
$result = $object->valid($user);
|
$result = $object->valid($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -447,8 +441,6 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou
|
|||||||
{
|
{
|
||||||
$idwarehouse=GETPOST('idwarehouse', 'int');
|
$idwarehouse=GETPOST('idwarehouse', 'int');
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $object->hasProductsOrServices(1))
|
if (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $object->hasProductsOrServices(1))
|
||||||
{
|
{
|
||||||
@ -506,7 +498,6 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo
|
|||||||
|
|
||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -624,7 +615,6 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) /
|
|||||||
// Build document
|
// Build document
|
||||||
|
|
||||||
// Sauvegarde le dernier module choisi pour generer un document
|
// Sauvegarde le dernier module choisi pour generer un document
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
{
|
{
|
||||||
@ -655,10 +645,8 @@ else if ($action == 'remove_file' && $user->rights->fournisseur->commande->creer
|
|||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
if ($object->fetch($id))
|
if ($resObj)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$upload_dir = $conf->fournisseur->commande->dir_output;
|
$upload_dir = $conf->fournisseur->commande->dir_output;
|
||||||
$file = $upload_dir . '/' . GETPOST('file');
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
@ -697,6 +685,7 @@ else if ($action == 'create' && $user->rights->fournisseur->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$id=$orderid;
|
$id=$orderid;
|
||||||
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
@ -744,10 +733,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
{
|
{
|
||||||
$langs->load('mails');
|
$langs->load('mails');
|
||||||
|
|
||||||
$result=$object->fetch($_POST['orderid']);
|
if ($resObj)
|
||||||
$result=$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
if ($result > 0)
|
|
||||||
{
|
{
|
||||||
// $ref = dol_sanitizeFileName($object->ref);
|
// $ref = dol_sanitizeFileName($object->ref);
|
||||||
// $file = $conf->fournisseur->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
// $file = $conf->fournisseur->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||||
@ -896,12 +882,10 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fourniss
|
|||||||
{
|
{
|
||||||
if ($action == 'addcontact')
|
if ($action == 'addcontact')
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
if ($resObj)
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
|
||||||
{
|
{
|
||||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -926,7 +910,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fourniss
|
|||||||
// bascule du statut d'un contact
|
// bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut')
|
else if ($action == 'swapstatut')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($resObj)
|
||||||
{
|
{
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
@ -939,7 +923,6 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fourniss
|
|||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact')
|
else if ($action == 'deletecontact')
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->delete_contact($_GET["lineid"]);
|
$result = $object->delete_contact($_GET["lineid"]);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -977,13 +960,8 @@ $now=dol_now();
|
|||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
//if ($mesg) print $mesg.'<br>';
|
//if ($mesg) print $mesg.'<br>';
|
||||||
|
|
||||||
$result=$object->fetch($id,$ref);
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
|
||||||
$soc->fetch($object->socid);
|
|
||||||
|
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->fetch($object->user_author_id);
|
$author->fetch($object->user_author_id);
|
||||||
|
|
||||||
@ -1021,7 +999,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$object->date_commande=dol_now();
|
$object->date_commande=dol_now();
|
||||||
|
|
||||||
// We check if number is temporary number
|
// We check if number is temporary number
|
||||||
if (preg_match('/^[\(]?PROV/i',$object->ref)) $newref = $object->getNextNumRef($soc);
|
if (preg_match('/^[\(]?PROV/i',$object->ref)) $newref = $object->getNextNumRef($object->thirdparty);
|
||||||
else $newref = $object->ref;
|
else $newref = $object->ref;
|
||||||
|
|
||||||
$text=$langs->trans('ConfirmValidateOrder',$newref);
|
$text=$langs->trans('ConfirmValidateOrder',$newref);
|
||||||
@ -1127,7 +1105,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Fournisseur
|
// Fournisseur
|
||||||
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
print '<td colspan="2">'.$object->thirdparty->getNomUrl(1,'supplier').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
@ -1458,7 +1436,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->load_tva('tva_tx',$line->tva_tx,$soc,$mysoc);
|
print $form->load_tva('tva_tx',$line->tva_tx,$object->thirdparty,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input size="5" type="text" name="pu" value="'.price($line->subprice).'"></td>';
|
print '<td align="right"><input size="5" type="text" name="pu" value="'.price($line->subprice).'"></td>';
|
||||||
print '<td align="right"><input size="2" type="text" name="qty" value="'.$line->qty.'"></td>';
|
print '<td align="right"><input size="2" type="text" name="qty" value="'.$line->qty.'"></td>';
|
||||||
@ -1528,11 +1506,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$soc,$mysoc);
|
print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$object->thirdparty,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" name="pu" size="5" value="'.GETPOST('pu').'"></td>';
|
print '<td align="right"><input type="text" name="pu" size="5" value="'.GETPOST('pu').'"></td>';
|
||||||
print '<td align="right"><input type="text" name="qty" value="'.(GETPOST('qty')?GETPOST('qty'):'1').'" size="2"></td>';
|
print '<td align="right"><input type="text" name="qty" value="'.(GETPOST('qty')?GETPOST('qty'):'1').'" size="2"></td>';
|
||||||
print '<td align="right" nowrap="nowrap"><input type="text" name="remise_percent" size="1" value="'.(GETPOST('remise_percent')?GETPOST('remise_percent'):$soc->remise_client).'">%</td>';
|
print '<td align="right" nowrap="nowrap"><input type="text" name="remise_percent" size="1" value="'.(GETPOST('remise_percent')?GETPOST('remise_percent'):$object->thirdparty->remise_client).'">%</td>';
|
||||||
print '<td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'"></td>';
|
print '<td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -1589,7 +1567,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" size="2" id="pqty" name="pqty" value="'.(GETPOST('pqty')?GETPOST('pqty'):'1').'"></td>';
|
print '<td align="right"><input type="text" size="2" id="pqty" name="pqty" value="'.(GETPOST('pqty')?GETPOST('pqty'):'1').'"></td>';
|
||||||
print '<td align="right" nowrap="nowrap"><input type="text" size="1" id="p_remise_percent" name="p_remise_percent" value="'.(GETPOST('p_remise_percent')?GETPOST('p_remise_percent'):$soc->remise_client).'">%</td>';
|
print '<td align="right" nowrap="nowrap"><input type="text" size="1" id="p_remise_percent" name="p_remise_percent" value="'.(GETPOST('p_remise_percent')?GETPOST('p_remise_percent'):$object->thirdparty->remise_client).'">%</td>';
|
||||||
print '<td align="center" colspan="4"><input type="submit" id="addPredefinedProductButton" class="button" value="'.$langs->trans('Add').'"></td>';
|
print '<td align="center" colspan="4"><input type="submit" id="addPredefinedProductButton" class="button" value="'.$langs->trans('Add').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -1716,7 +1694,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$genallowed=$user->rights->fournisseur->commande->creer;
|
$genallowed=$user->rights->fournisseur->commande->creer;
|
||||||
$delallowed=$user->rights->fournisseur->commande->supprimer;
|
$delallowed=$user->rights->fournisseur->commande->supprimer;
|
||||||
|
|
||||||
print $formfile->showdocuments('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,0,0,'','','',$soc->default_lang);
|
print $formfile->showdocuments('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,0,0,'','','',$object->thirdparty->default_lang);
|
||||||
$somethingshown=$formfile->numoffiles;
|
$somethingshown=$formfile->numoffiles;
|
||||||
|
|
||||||
$object=$object;
|
$object=$object;
|
||||||
@ -1847,7 +1825,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$formmail->frommail = $user->email;
|
$formmail->frommail = $user->email;
|
||||||
$formmail->withfrom=1;
|
$formmail->withfrom=1;
|
||||||
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
||||||
$formmail->withtosocid=$soc->id;
|
$formmail->withtosocid=$object->thirdparty->id;
|
||||||
$formmail->withtocc=1;
|
$formmail->withtocc=1;
|
||||||
$formmail->withtoccsocid=0;
|
$formmail->withtoccsocid=0;
|
||||||
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
|
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
|
||||||
|
|||||||
@ -35,7 +35,7 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position)
|
|||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3,'AC_PROP','systemauto', 'Send commercial proposal by email','propal',0,10);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3,'AC_PROP','systemauto', 'Send commercial proposal by email','propal',0,10);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4,'AC_EMAIL','system','Send Email',NULL, 1, 4);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4,'AC_EMAIL','system','Send Email',NULL, 1, 4);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5, 'AC_RDV', 'system', 'Rendez-vous' ,NULL, ,1 1);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5,'AC_RDV','system','Rendez-vous',NULL, 1, 1);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 8,'AC_COM','systemauto','Send customer order by email','order', 0,8);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 8,'AC_COM','systemauto','Send customer order by email','order', 0,8);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 9,'AC_FAC','systemauto', 'Send customer invoice by email','invoice',0,6);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 9,'AC_FAC','systemauto', 'Send customer invoice by email','invoice',0,6);
|
||||||
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 10,'AC_SHIP','systemauto', 'Send shipping by email','shipping',0,11);
|
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 10,'AC_SHIP','systemauto', 'Send shipping by email','shipping',0,11);
|
||||||
|
|||||||
@ -34,7 +34,7 @@ MakeWithdrawRequest=Fer una petició de domiciliació
|
|||||||
ThirdPartyBankCode=Codi banc del tercer
|
ThirdPartyBankCode=Codi banc del tercer
|
||||||
ThirdPartyDeskCode=Codi oficina del tercer
|
ThirdPartyDeskCode=Codi oficina del tercer
|
||||||
NoInvoiceCouldBeWithdrawed=No s'ha domiciliat cap factura. Assegureu-vos que les factures són d'empreses amb les dades de comptes bancaris correctes.
|
NoInvoiceCouldBeWithdrawed=No s'ha domiciliat cap factura. Assegureu-vos que les factures són d'empreses amb les dades de comptes bancaris correctes.
|
||||||
ClassCredited=Abonar
|
ClassCredited=Classificar com "Abonada"
|
||||||
ClassCreditedConfirm=Esteu segur de voler classificar aquesta domiciliació com abonada al seu compte bancari?
|
ClassCreditedConfirm=Esteu segur de voler classificar aquesta domiciliació com abonada al seu compte bancari?
|
||||||
TransData=Data enviament
|
TransData=Data enviament
|
||||||
TransMetod=Mètode enviament
|
TransMetod=Mètode enviament
|
||||||
@ -81,6 +81,9 @@ WithdrawalFileNotCapable=No es possible generar fitxer bancari de domiciliacio p
|
|||||||
ShowWithdraw=Veure domiciliació
|
ShowWithdraw=Veure domiciliació
|
||||||
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=No obstant això, si la factura té pendent algun pagament per domiciliació, no serà tancada per a permetre la gestió de la domiciliació.
|
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=No obstant això, si la factura té pendent algun pagament per domiciliació, no serà tancada per a permetre la gestió de la domiciliació.
|
||||||
DoStandingOrdersBeforePayments=Aquesta pestanya us permet realitzar una petició de domiciliació. Un cop, podeu ingressar el pagament a la factura per procedir al seu tancament.
|
DoStandingOrdersBeforePayments=Aquesta pestanya us permet realitzar una petició de domiciliació. Un cop, podeu ingressar el pagament a la factura per procedir al seu tancament.
|
||||||
|
WithdrawalFile=Arxiu de la domiciliació
|
||||||
|
SetToStatusSent=Classificar com "Arxiu enviat"
|
||||||
|
ThisWillAlsoAddPaymentOnInvoice=Es crearan els pagaments de les factures i les classificarà com pagades
|
||||||
|
|
||||||
### Notifications
|
### Notifications
|
||||||
InfoCreditSubject=Abonament de domiciliació %s pel banc
|
InfoCreditSubject=Abonament de domiciliació %s pel banc
|
||||||
|
|||||||
@ -1323,6 +1323,7 @@ AccountancyCodeBuy=Purchase account. code
|
|||||||
AgendaSetup=Events and agenda module setup
|
AgendaSetup=Events and agenda module setup
|
||||||
PasswordTogetVCalExport=Key to authorize export link
|
PasswordTogetVCalExport=Key to authorize export link
|
||||||
PastDelayVCalExport=Do not export event older than
|
PastDelayVCalExport=Do not export event older than
|
||||||
|
AGENDA_USE_EVENT_TYPE=Use events types (manage into Configuration->Dictionnary->llx_c_actioncomm)
|
||||||
##### ClickToDial #####
|
##### ClickToDial #####
|
||||||
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
|
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
|
||||||
##### Point Of Sales (CashDesk) #####
|
##### Point Of Sales (CashDesk) #####
|
||||||
|
|||||||
@ -34,7 +34,7 @@ MakeWithdrawRequest=Realizar una petición de domiciliación
|
|||||||
ThirdPartyBankCode=Código banco del tercero
|
ThirdPartyBankCode=Código banco del tercero
|
||||||
ThirdPartyDeskCode=Código oficina del tercero
|
ThirdPartyDeskCode=Código oficina del tercero
|
||||||
NoInvoiceCouldBeWithdrawed=No se ha domiciliado ninguna factura. Asegúrese de que las facturas son de empresas con los datos de cuentas bancarias correctos.
|
NoInvoiceCouldBeWithdrawed=No se ha domiciliado ninguna factura. Asegúrese de que las facturas son de empresas con los datos de cuentas bancarias correctos.
|
||||||
ClassCredited=Abonar
|
ClassCredited=Clasificar como "Abonada"
|
||||||
ClassCreditedConfirm=¿Está seguro de querer clasificar esta domiciliación como abonada en su cuenta bancaria?
|
ClassCreditedConfirm=¿Está seguro de querer clasificar esta domiciliación como abonada en su cuenta bancaria?
|
||||||
TransData=Fecha envío
|
TransData=Fecha envío
|
||||||
TransMetod=Método envío
|
TransMetod=Método envío
|
||||||
@ -81,6 +81,9 @@ WithdrawalFileNotCapable=No es posible generar fichero bancario de domiciliacion
|
|||||||
ShowWithdraw=Ver domiciliación
|
ShowWithdraw=Ver domiciliación
|
||||||
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación, no será cerrada para permitir la gestión de la domiciliación.
|
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación, no será cerrada para permitir la gestión de la domiciliación.
|
||||||
DoStandingOrdersBeforePayments=Esta pestaña le permite realizar una petición de domiciliación. Una vez terminada, puede ingresar el pago en la factura para proceder a su cierre.
|
DoStandingOrdersBeforePayments=Esta pestaña le permite realizar una petición de domiciliación. Una vez terminada, puede ingresar el pago en la factura para proceder a su cierre.
|
||||||
|
WithdrawalFile=Archivo de la domiciliación
|
||||||
|
SetToStatusSent=Clasificar como "Archivo enviado"
|
||||||
|
ThisWillAlsoAddPaymentOnInvoice=Se crearán los pagos de las facturas y las clasificará como pagadas
|
||||||
|
|
||||||
### Notifications
|
### Notifications
|
||||||
InfoCreditSubject=Abono de domiciliación %s por el banco
|
InfoCreditSubject=Abono de domiciliación %s por el banco
|
||||||
|
|||||||
@ -1330,6 +1330,7 @@ AccountancyCodeBuy=Code compta achat
|
|||||||
AgendaSetup= Configuration du module actions et agenda
|
AgendaSetup= Configuration du module actions et agenda
|
||||||
PasswordTogetVCalExport= Clé pour autoriser lien export
|
PasswordTogetVCalExport= Clé pour autoriser lien export
|
||||||
PastDelayVCalExport=Ne pas exporter les événements de plus de
|
PastDelayVCalExport=Ne pas exporter les événements de plus de
|
||||||
|
AGENDA_USE_EVENT_TYPE=Utilisez les type des évenements (administrable dans Configuration->Dictionnary->llx_c_actioncomm)
|
||||||
##### ClickToDial #####
|
##### ClickToDial #####
|
||||||
ClickToDialDesc= Ce module permet d'ajouter un petit picto à côté des numéros de téléphones. Un clic sur ce picto provoque l'appel de l'URL définie dans ce paramétrage. Ceci permet de provoquer des appels à un serveur de téléphonie depuis Dolibarr qui peut alors composer le numéro sur un système SIP par exemple.
|
ClickToDialDesc= Ce module permet d'ajouter un petit picto à côté des numéros de téléphones. Un clic sur ce picto provoque l'appel de l'URL définie dans ce paramétrage. Ceci permet de provoquer des appels à un serveur de téléphonie depuis Dolibarr qui peut alors composer le numéro sur un système SIP par exemple.
|
||||||
##### Point Of Sales (CashDesk) #####
|
##### Point Of Sales (CashDesk) #####
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user