Skip to content

Commit

Permalink
Fix: missing model selected
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Mar 17, 2016
1 parent 1ded08a commit 2642b71
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions htdocs/commande/card.php
Expand Up @@ -644,7 +644,7 @@
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
if (empty($tva_tx)) $tva_npr=0;

$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
Expand Down Expand Up @@ -1397,7 +1397,7 @@
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
$("#socid").change(function() {
var socid = $(this).val();
// reload page
Expand Down Expand Up @@ -2311,7 +2311,7 @@
{
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
}

// Create intervention
if ($conf->ficheinter->enabled) {
$langs->load("interventions");
Expand All @@ -2328,12 +2328,12 @@
// Create contract
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
$langs->load("contracts");

if ($user->rights->contrat->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a></div>';
}
}

// Ship
$numshipping = 0;
if (! empty($conf->expedition->enabled)) {
Expand Down Expand Up @@ -2400,6 +2400,11 @@
print '</div>';
}

// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}

if ($action != 'presend')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
Expand Down Expand Up @@ -2498,7 +2503,7 @@
{
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'ord'.$object->id);
}
}
$formmail->withfrom = 1;
$liste = array();
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value)
Expand Down

0 comments on commit 2642b71

Please sign in to comment.