NEW Can create thirdparty from card proposal, order or invoice

This commit is contained in:
Laurent Destailleur
2017-08-28 18:37:16 +02:00
parent f1633d72f8
commit 7aa09d8b71
7 changed files with 10 additions and 2 deletions

View File

@@ -1376,6 +1376,7 @@ if ($action == 'create')
});
</script>';
}
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
print '</tr>' . "\n";

View File

@@ -1467,7 +1467,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<input type="text" name="ref_client" value="'.GETPOST('ref_client').'"></td>';
print '</tr>';
// Client
// Thirdparty
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans('Customer') . '</td>';
if ($socid > 0) {
@@ -1491,6 +1491,7 @@ if ($action == 'create' && $user->rights->commande->creer)
});
</script>';
}
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
print '</tr>' . "\n";

View File

@@ -2195,7 +2195,7 @@ if ($action == 'create')
// Thirdparty
print '<td class="fieldrequired">' . $langs->trans('Customer') . '</td>';
if ($soc->id > 0 && ! GETPOST('fac_rec'))
if ($soc->id > 0 && ! GETPOST('fac_rec','alpha'))
{
print '<td colspan="2">';
print $soc->getNomUrl(1);
@@ -2210,6 +2210,7 @@ if ($action == 'create')
print ' / ' . price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
}
print ')';
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&fac_rec='.GETPOST('fac_rec','alpha')).'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
else
@@ -2230,6 +2231,7 @@ if ($action == 'create')
});
</script>';
}
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
print '</tr>' . "\n";

View File

@@ -1153,6 +1153,7 @@ if ($action == 'create')
{
print '<td>';
print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300');
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
print '</tr>'."\n";

View File

@@ -1459,6 +1459,7 @@ if ($action=='create')
});
</script>';
}
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
}
print '</td>';

View File

@@ -1487,6 +1487,7 @@ if ($action == 'create')
});
</script>';
}
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
}
print '</td></tr>';

View File

@@ -1063,6 +1063,7 @@ if ($action == 'create')
} else {
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.fournisseur = 1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
print '</td>';
}
print '</tr>' . "\n";