Merge pull request #4837 from hregis/3.9_order
Fix: missing model selected
This commit is contained in:
commit
dc78cc7ced
@ -644,7 +644,7 @@ if (empty($reshook))
|
|||||||
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
|
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
|
||||||
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
|
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
|
||||||
if (empty($tva_tx)) $tva_npr=0;
|
if (empty($tva_tx)) $tva_npr=0;
|
||||||
|
|
||||||
$pu_ht = $prod->price;
|
$pu_ht = $prod->price;
|
||||||
$pu_ttc = $prod->price_ttc;
|
$pu_ttc = $prod->price_ttc;
|
||||||
$price_min = $prod->price_min;
|
$price_min = $prod->price_min;
|
||||||
@ -1397,7 +1397,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
||||||
{
|
{
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#socid").change(function() {
|
$("#socid").change(function() {
|
||||||
var socid = $(this).val();
|
var socid = $(this).val();
|
||||||
// reload page
|
// reload page
|
||||||
@ -2311,7 +2311,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create intervention
|
// Create intervention
|
||||||
if ($conf->ficheinter->enabled) {
|
if ($conf->ficheinter->enabled) {
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
@ -2328,12 +2328,12 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
// Create contract
|
// Create contract
|
||||||
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
|
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|
||||||
if ($user->rights->contrat->creer) {
|
if ($user->rights->contrat->creer) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ship
|
// Ship
|
||||||
$numshipping = 0;
|
$numshipping = 0;
|
||||||
if (! empty($conf->expedition->enabled)) {
|
if (! empty($conf->expedition->enabled)) {
|
||||||
@ -2400,6 +2400,11 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Select mail models is same action as presend
|
||||||
|
if (GETPOST('modelselected')) {
|
||||||
|
$action = 'presend';
|
||||||
|
}
|
||||||
|
|
||||||
if ($action != 'presend')
|
if ($action != 'presend')
|
||||||
{
|
{
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
@ -2498,7 +2503,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'ord'.$object->id);
|
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'ord'.$object->id);
|
||||||
}
|
}
|
||||||
$formmail->withfrom = 1;
|
$formmail->withfrom = 1;
|
||||||
$liste = array();
|
$liste = array();
|
||||||
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value)
|
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user