New: Feature to link manually an order to an invoice does not disappear
once link has been done.
This commit is contained in:
parent
1bbdd3798e
commit
4d515d660c
@ -5,6 +5,8 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||||
For users:
|
For users:
|
||||||
|
- New: Feature to link manually an order to an invoice does not disappear once
|
||||||
|
link has been done.
|
||||||
- New: Can set a color on user card (visible into agenda view).
|
- New: Can set a color on user card (visible into agenda view).
|
||||||
- New: extrafields for projects and tasks are exported to ODT documents.
|
- New: extrafields for projects and tasks are exported to ODT documents.
|
||||||
- New: Add number of active notification into tab title (like we do for notes and documents)
|
- New: Add number of active notification into tab title (like we do for notes and documents)
|
||||||
|
|||||||
@ -3579,21 +3579,24 @@ if ($action == 'create')
|
|||||||
// Linked object block
|
// Linked object block
|
||||||
$somethingshown = $object->showLinkedObjectBlock();
|
$somethingshown = $object->showLinkedObjectBlock();
|
||||||
|
|
||||||
if (empty($somethingshown) && ! empty($conf->commande->enabled))
|
$linktoelem='';
|
||||||
|
|
||||||
|
if (! empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
print '<br><a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
$linktoelem.=($linktoelem?' ':'').'<a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
||||||
|
|
||||||
print '
|
print '
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery("#linktoorder").click(function() {
|
jQuery("#linktoorder").click(function() {
|
||||||
jQuery("#commande").toggle();
|
jQuery("#orderlist").toggle();
|
||||||
|
jQuery("#linktoorder").toggle();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
';
|
';
|
||||||
|
|
||||||
print '<div id="commande" style="display:none">';
|
print '<div id="orderlist" style="display:none">';
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_client, c.total_ht";
|
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_client, c.total_ht";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
||||||
@ -3601,11 +3604,12 @@ if ($action == 'create')
|
|||||||
$sql .= ' WHERE c.fk_soc = s.rowid AND c.fk_soc = ' . $soc->id . '';
|
$sql .= ' WHERE c.fk_soc = s.rowid AND c.fk_soc = ' . $soc->id . '';
|
||||||
|
|
||||||
$resqlorderlist = $db->query($sql);
|
$resqlorderlist = $db->query($sql);
|
||||||
if ($resqlorderlist) {
|
if ($resqlorderlist)
|
||||||
|
{
|
||||||
$num = $db->num_rows($resqlorderlist);
|
$num = $db->num_rows($resqlorderlist);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<form action="" method="POST" name="LinkedOrder">';
|
print '<br><form action="" method="POST" name="LinkedOrder">';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="nowrap"></td>';
|
print '<td class="nowrap"></td>';
|
||||||
@ -3614,7 +3618,8 @@ if ($action == 'create')
|
|||||||
print '<td align="left">' . $langs->trans("AmountHTShort") . '</td>';
|
print '<td align="left">' . $langs->trans("AmountHTShort") . '</td>';
|
||||||
print '<td align="left">' . $langs->trans("Company") . '</td>';
|
print '<td align="left">' . $langs->trans("Company") . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
while ($i < $num) {
|
while ($i < $num)
|
||||||
|
{
|
||||||
$objp = $db->fetch_object($resqlorderlist);
|
$objp = $db->fetch_object($resqlorderlist);
|
||||||
if ($objp->socid == $soc->id) {
|
if ($objp->socid == $soc->id) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
@ -3632,7 +3637,7 @@ if ($action == 'create')
|
|||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><center><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"></center>';
|
print '<br><center><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"> <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></center>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
$db->free($resqlorderlist);
|
$db->free($resqlorderlist);
|
||||||
} else {
|
} else {
|
||||||
@ -3642,6 +3647,9 @@ if ($action == 'create')
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show link to elements
|
||||||
|
if ($linktoelem) print '<br>'.$linktoelem;
|
||||||
|
|
||||||
// Link for paypal payment
|
// Link for paypal payment
|
||||||
if (! empty($conf->paypal->enabled) && $object->statut != 0) {
|
if (! empty($conf->paypal->enabled) && $object->statut != 0) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
|
||||||
|
|||||||
@ -2288,21 +2288,24 @@ else
|
|||||||
*/
|
*/
|
||||||
$somethingshown=$object->showLinkedObjectBlock();
|
$somethingshown=$object->showLinkedObjectBlock();
|
||||||
|
|
||||||
|
$linktoelem='';
|
||||||
|
|
||||||
if (empty($somethingshown) && ! empty($conf->fournisseur->enabled))
|
if (empty($somethingshown) && ! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
print '<br><a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
$linktoelem.=($linktoelem?' ':'').'<a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
||||||
|
|
||||||
print '
|
print '
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery("#linktoorder").click(function() {
|
jQuery("#linktoorder").click(function() {
|
||||||
jQuery("#commande").toggle();
|
jQuery("#orderlist").toggle();
|
||||||
});
|
jQuery("#linktoorder").toggle();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
';
|
';
|
||||||
|
|
||||||
print '<div id="commande" style="display:none">';
|
print '<div id="orderlist" style="display:none">';
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_supplier, c.total_ht";
|
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_supplier, c.total_ht";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
||||||
@ -2314,7 +2317,7 @@ else
|
|||||||
$num = $db->num_rows($resqlorderlist);
|
$num = $db->num_rows($resqlorderlist);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<form action="" method="POST" name="LinkedOrder">';
|
print '<br><form action="" method="POST" name="LinkedOrder">';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="nowrap"></td>';
|
print '<td class="nowrap"></td>';
|
||||||
@ -2341,7 +2344,7 @@ else
|
|||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><center><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"></center>';
|
print '<br><center><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"> <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></center>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
$db->free($resqlorderlist);
|
$db->free($resqlorderlist);
|
||||||
} else {
|
} else {
|
||||||
@ -2351,6 +2354,9 @@ else
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show link to elements
|
||||||
|
if ($linktoelem) print '<br>'.$linktoelem;
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
//print '</td><td valign="top" width="50%">';
|
//print '</td><td valign="top" width="50%">';
|
||||||
//print '<br>';
|
//print '<br>';
|
||||||
|
|||||||
@ -32,6 +32,7 @@ echo '<br>';
|
|||||||
if ($num > 1) print_titre($langs->trans("RelatedBills"));
|
if ($num > 1) print_titre($langs->trans("RelatedBills"));
|
||||||
else print_titre($langs->trans("RelatedBill"));
|
else print_titre($langs->trans("RelatedBill"));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="noborder allwidth">
|
<table class="noborder allwidth">
|
||||||
<tr class="liste_titre">
|
<tr class="liste_titre">
|
||||||
<td><?php echo $langs->trans("Ref"); ?></td>
|
<td><?php echo $langs->trans("Ref"); ?></td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user