Debug variants
This commit is contained in:
parent
2fa3b23cf1
commit
9871dd8770
@ -208,8 +208,8 @@ UseMultipriceRules=Use price segment rules (defined into product module setup) t
|
|||||||
PercentVariationOver=%% variation over %s
|
PercentVariationOver=%% variation over %s
|
||||||
PercentDiscountOver=%% discount over %s
|
PercentDiscountOver=%% discount over %s
|
||||||
KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products
|
KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products
|
||||||
VariantRefExample=Example: COL
|
VariantRefExample=Examples: COL, SIZE
|
||||||
VariantLabelExample=Example: Color
|
VariantLabelExample=Examples: Color, Size
|
||||||
### composition fabrication
|
### composition fabrication
|
||||||
Build=Produce
|
Build=Produce
|
||||||
ProductsMultiPrice=Products and prices for each price segment
|
ProductsMultiPrice=Products and prices for each price segment
|
||||||
|
|||||||
@ -804,8 +804,8 @@ if (! $variants) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>';
|
print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>';
|
||||||
print '<td class="right">' . $langs->trans("NumberOfUnit") . '</td>';
|
print '<td class="right">' . $langs->trans("NumberOfUnit") . '</td>';
|
||||||
@ -918,7 +918,8 @@ if (! $variants) {
|
|||||||
print '<td class="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>';
|
print '<td class="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>';
|
||||||
print '<td class="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>';
|
print '<td class="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>';
|
||||||
print '<td class="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
|
print '<td class="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
|
||||||
print '<td colspan="4"></td></tr>';
|
print '<td colspan="4"></td>';
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -926,6 +927,7 @@ if (! $variants) {
|
|||||||
}
|
}
|
||||||
} else dol_print_error($db);
|
} else dol_print_error($db);
|
||||||
|
|
||||||
|
// Total line
|
||||||
print '<tr class="liste_total"><td class="right liste_total" colspan="4">' . $langs->trans("Total") . ':</td>';
|
print '<tr class="liste_total"><td class="right liste_total" colspan="4">' . $langs->trans("Total") . ':</td>';
|
||||||
print '<td class="liste_total right">' . price2num($total, 'MS') . '</td>';
|
print '<td class="liste_total right">' . price2num($total, 'MS') . '</td>';
|
||||||
print '<td class="liste_total right">';
|
print '<td class="liste_total right">';
|
||||||
@ -945,6 +947,7 @@ if (! $variants) {
|
|||||||
else print $langs->trans("Variable");
|
else print $langs->trans("Variable");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
@ -1067,6 +1070,7 @@ if (! $variants) {
|
|||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4" class="left">'.$langs->trans("Total").'</td>';
|
print '<td colspan="4" class="left">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="right">'.$stock_total.'</td>';
|
print '<td class="right">'.$stock_total.'</td>';
|
||||||
|
print '<td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -377,6 +377,7 @@ if (! empty($id) || ! empty($ref))
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
$listofvariantselected = '';
|
||||||
|
|
||||||
// Create or edit a varian
|
// Create or edit a varian
|
||||||
if ($action == 'add' || ($action == 'edit')) {
|
if ($action == 'add' || ($action == 'edit')) {
|
||||||
@ -386,7 +387,7 @@ if (! empty($id) || ! empty($ref))
|
|||||||
//print dol_fiche_head();
|
//print dol_fiche_head();
|
||||||
$features = $_SESSION['addvariant_'.$object->id];
|
$features = $_SESSION['addvariant_'.$object->id];
|
||||||
//First, sanitize
|
//First, sanitize
|
||||||
print '<div id="parttoaddvariant">';
|
$listofvariantselected = '<div id="parttoaddvariant">';
|
||||||
if (! empty($features)) {
|
if (! empty($features)) {
|
||||||
foreach ($features as $feature) {
|
foreach ($features as $feature) {
|
||||||
|
|
||||||
@ -400,16 +401,14 @@ if (! empty($id) || ! empty($ref))
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<i>' . $prodattr->label . '</i>:'. $prodattr_val->value . ' ';
|
$listofvariantselected .= '<i>' . $prodattr->label . '</i>:'. $prodattr_val->value . ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</div>';
|
$listofvariantselected .= '</div>';
|
||||||
print '<br><br>';
|
|
||||||
//print dol_fiche_end();
|
//print dol_fiche_end();
|
||||||
} else {
|
} else {
|
||||||
$title = $langs->trans('EditProductCombination');
|
$title = $langs->trans('EditProductCombination');
|
||||||
}
|
}
|
||||||
print load_fiche_titre($title);
|
|
||||||
|
|
||||||
if ($action == 'add') {
|
if ($action == 'add') {
|
||||||
$prodattr_all = $prodattr->fetchAll();
|
$prodattr_all = $prodattr->fetchAll();
|
||||||
@ -499,6 +498,10 @@ if (! empty($id) || ! empty($ref))
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print load_fiche_titre($title);
|
||||||
|
|
||||||
print '<form method="post" id="combinationform" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="post" id="combinationform" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'">'."\n";
|
print '<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'">'."\n";
|
||||||
@ -524,6 +527,7 @@ if (! empty($id) || ! empty($ref))
|
|||||||
print '<option value="-1"> </option>';
|
print '<option value="-1"> </option>';
|
||||||
foreach ($prodattr_all as $attr)
|
foreach ($prodattr_all as $attr)
|
||||||
{
|
{
|
||||||
|
//print '<option value="'.$attr->id.'"'.($attr->id == GETPOST('attribute', 'int') ? ' selected="selected"' : '').'>'.$attr->label.'</option>';
|
||||||
print '<option value="'.$attr->id.'">'.$attr->label.'</option>';
|
print '<option value="'.$attr->id.'">'.$attr->label.'</option>';
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
@ -561,6 +565,10 @@ if (! empty($id) || ! empty($ref))
|
|||||||
<input type="submit" class="button" name="selectvariant" id="selectvariant" value="<?php echo dol_escape_htmltag($langs->trans("SelectCombination")); ?>">
|
<input type="submit" class="button" name="selectvariant" id="selectvariant" value="<?php echo dol_escape_htmltag($langs->trans("SelectCombination")); ?>">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr><td></td><td>
|
||||||
|
<?php echo $listofvariantselected; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -781,8 +789,8 @@ if (! empty($id) || ! empty($ref))
|
|||||||
</td>
|
</td>
|
||||||
<td class="right"><?php echo ($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?></td>
|
<td class="right"><?php echo ($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?></td>
|
||||||
<?php if ($object->isProduct()) print '<td class="right">'.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').'</td>'; ?>
|
<?php if ($object->isProduct()) print '<td class="right">'.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').'</td>'; ?>
|
||||||
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
|
<td class="center"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
|
||||||
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
|
<td class="center"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
|
||||||
<td class="right">
|
<td class="right">
|
||||||
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=edit&valueid='.$currcomb->id, 2) ?>"><?php echo img_edit() ?></a>
|
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=edit&valueid='.$currcomb->id, 2) ?>"><?php echo img_edit() ?></a>
|
||||||
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>
|
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user