forked from Wavyzz/dolibarr
New: Merge free product and predefined product area to enter new
product (Supplier orders now use same template than customer orders/proposal/invoices).
This commit is contained in:
@@ -572,18 +572,17 @@ else if ($action == 'addline' && $user->rights->propal->creer) {
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($idprod) && GETPOST('type') < 0) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) {
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
|
||||
if (empty($idprod) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for
|
||||
// proposal.
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal.
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && empty($product_desc)) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) {
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
@@ -754,15 +753,20 @@ else if ($action == 'addline' && $user->rights->propal->creer) {
|
||||
unset($_POST ['np_marginRate']);
|
||||
unset($_POST ['np_markRate']);
|
||||
unset($_POST ['dp_desc']);
|
||||
|
||||
unset($_POST ['idprod']);
|
||||
unset($_POST ['qty_predef']);
|
||||
unset($_POST ['remise_percent_predef']);
|
||||
unset($_POST ['fournprice_predef']);
|
||||
unset($_POST ['buying_price_predef']);
|
||||
unset($_POST ['np_marginRate_predef']);
|
||||
unset($_POST ['np_markRate_predef']);
|
||||
unset($_POST ['np_desc']);
|
||||
|
||||
unset($_POST['date_starthour']);
|
||||
unset($_POST['date_startmin']);
|
||||
unset($_POST['date_startsec']);
|
||||
unset($_POST['date_startday']);
|
||||
unset($_POST['date_startmonth']);
|
||||
unset($_POST['date_startyear']);
|
||||
unset($_POST['date_endhour']);
|
||||
unset($_POST['date_endmin']);
|
||||
unset($_POST['date_endsec']);
|
||||
unset($_POST['date_endday']);
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
|
||||
@@ -513,11 +513,11 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
|
||||
setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && GETPOST('type') < 0) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) {
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
|
||||
$error ++;
|
||||
@@ -526,7 +526,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && empty($product_desc)) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) {
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
@@ -697,15 +697,20 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
|
||||
unset($_POST ['np_marginRate']);
|
||||
unset($_POST ['np_markRate']);
|
||||
unset($_POST ['dp_desc']);
|
||||
|
||||
unset($_POST ['idprod']);
|
||||
unset($_POST ['qty_predef']);
|
||||
unset($_POST ['remise_percent_predef']);
|
||||
unset($_POST ['fournprice_predef']);
|
||||
unset($_POST ['buying_price_predef']);
|
||||
unset($_POST ['np_marginRate_predef']);
|
||||
unset($_POST ['np_markRate_predef']);
|
||||
unset($_POST ['np_desc']);
|
||||
|
||||
unset($_POST['date_starthour']);
|
||||
unset($_POST['date_startmin']);
|
||||
unset($_POST['date_startsec']);
|
||||
unset($_POST['date_startday']);
|
||||
unset($_POST['date_startmonth']);
|
||||
unset($_POST['date_startyear']);
|
||||
unset($_POST['date_endhour']);
|
||||
unset($_POST['date_endmin']);
|
||||
unset($_POST['date_endsec']);
|
||||
unset($_POST['date_endday']);
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
} else {
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
|
||||
@@ -1077,11 +1077,11 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && GETPOST('type') < 0) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) {
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors');
|
||||
$error ++;
|
||||
@@ -1090,7 +1090,7 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
if (empty($idprod) && empty($product_desc)) {
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) {
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors');
|
||||
$error ++;
|
||||
}
|
||||
@@ -1269,15 +1269,20 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
unset($_POST['np_marginRate']);
|
||||
unset($_POST['np_markRate']);
|
||||
unset($_POST['dp_desc']);
|
||||
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['qty_predef']);
|
||||
unset($_POST['remise_percent_predef']);
|
||||
unset($_POST['fournprice_predef']);
|
||||
unset($_POST['buying_price_predef']);
|
||||
unset($_POST['np_marginRate_predef']);
|
||||
unset($_POST['np_markRate_predef']);
|
||||
unset($_POST['np_desc']);
|
||||
|
||||
unset($_POST['date_starthour']);
|
||||
unset($_POST['date_startmin']);
|
||||
unset($_POST['date_startsec']);
|
||||
unset($_POST['date_startday']);
|
||||
unset($_POST['date_startmonth']);
|
||||
unset($_POST['date_startyear']);
|
||||
unset($_POST['date_endhour']);
|
||||
unset($_POST['date_endmin']);
|
||||
unset($_POST['date_endsec']);
|
||||
unset($_POST['date_endday']);
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
} else {
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")),'errors');
|
||||
$error++;
|
||||
}
|
||||
if ((GETPOST('price_ht') == '' || ! GETPOST('dp_desc')) && ! GETPOST('idprod'))
|
||||
if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")),'errors');
|
||||
$error++;
|
||||
@@ -526,16 +526,23 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
||||
unset($_POST['product_desc']);
|
||||
unset($_POST['fournprice']);
|
||||
unset($_POST['buying_price']);
|
||||
unset($_POST ['np_marginRate']);
|
||||
unset($_POST ['np_markRate']);
|
||||
unset($_POST['dp_desc']);
|
||||
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['qty_predef']);
|
||||
unset($_POST['remise_percent_predef']);
|
||||
unset($_POST['fournprice_predef']);
|
||||
unset($_POST['buying_price_predef']);
|
||||
unset($_POST['np_marginRate_predef']);
|
||||
unset($_POST['np_markRate_predef']);
|
||||
unset($_POST['np_desc']);
|
||||
|
||||
unset($_POST['date_starthour']);
|
||||
unset($_POST['date_startmin']);
|
||||
unset($_POST['date_startsec']);
|
||||
unset($_POST['date_startday']);
|
||||
unset($_POST['date_startmonth']);
|
||||
unset($_POST['date_startyear']);
|
||||
unset($_POST['date_endhour']);
|
||||
unset($_POST['date_endmin']);
|
||||
unset($_POST['date_endsec']);
|
||||
unset($_POST['date_endday']);
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1697,9 +1697,10 @@ class Form
|
||||
* @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
|
||||
* @param string $filtre For a SQL filter
|
||||
* @param array $ajaxoptions Options for ajax_autocompleter
|
||||
* @param int $hidelabel Hide label (0=no, 1=yes)
|
||||
* @return void
|
||||
*/
|
||||
function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array())
|
||||
function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0)
|
||||
{
|
||||
global $langs,$conf;
|
||||
global $price_level, $status, $finished;
|
||||
@@ -1709,8 +1710,7 @@ class Form
|
||||
// mode=2 means suppliers products
|
||||
$urloption=($socid > 0?'socid='.$socid.'&':'').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished;
|
||||
print ajax_autocompleter('', $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||
print $langs->trans("RefOrLabel").' : <input type="text" size="16" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
||||
print '<br>';
|
||||
print ($hidelabel?'':$langs->trans("RefOrLabel").' : ').'<input type="text" size="16" name="search_'.$htmlname.'" id="search_'.$htmlname.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -129,7 +129,10 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
||||
if (ui.item.disabled) {
|
||||
$("#" + options.option_disabled).attr("disabled", "disabled");
|
||||
if (options.error) {
|
||||
$.jnotify(options.error, "error", true);
|
||||
$.jnotify(options.error, "error", true); // Output with jnotify the error message
|
||||
}
|
||||
if (options.warning) {
|
||||
$.jnotify(options.warning, "warning", false); // Output with jnotify the warning message
|
||||
}
|
||||
} else {
|
||||
$("#" + options.option_disabled).removeAttr("disabled");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
@@ -22,12 +22,17 @@
|
||||
* $langs
|
||||
* $dateSelector
|
||||
* $this (invoice, order, ...)
|
||||
* $line defined
|
||||
* $inputalsopricewithtax
|
||||
* $forceall (0 by default, 1 for supplier invoices/orders)
|
||||
* $senderissupplier (0 by default, 1 for supplier invoices/orders)
|
||||
*/
|
||||
|
||||
global $dateSelector, $forceall, $senderissupplier;
|
||||
|
||||
$usemargins=0;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
|
||||
if (empty($forceall)) $forceall=0;
|
||||
if (empty($senderissupplier)) $senderissupplier=0;
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->
|
||||
@@ -38,6 +43,9 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob
|
||||
</td>
|
||||
<td align="right"><span id="title_vat"><?php echo $langs->trans('VAT'); ?></span></td>
|
||||
<td align="right"><span id="title_up_ht"><?php echo $langs->trans('PriceUHT'); ?></span></td>
|
||||
<?php if (! empty($inputalsopricewithtax)) { ?>
|
||||
<td align="right"><span id="title_up_ttc"><?php echo $langs->trans('PriceUTTC'); ?></span></td>
|
||||
<?php } ?>
|
||||
<td align="right"><?php echo $langs->trans('Qty'); ?></td>
|
||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||
<?php
|
||||
@@ -85,50 +93,79 @@ else {
|
||||
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#idprod').change(function() {
|
||||
if (jQuery('#idprod').val() > 0) jQuery('#np_desc').focus();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
// Free line
|
||||
echo '<span>';
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
// Show radio free line
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_free" value="free"'.(GETPOST('prod_entry_mode')=='free'?' checked="true"':'').'> ';
|
||||
else echo '<input type="hidden" id="prod_entry_mode_free" name="prod_entry_mode" value="free">';
|
||||
// Show type selector
|
||||
if (empty($conf->product->enabled) && empty($conf->service->enabled))
|
||||
{
|
||||
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_free" value="free"'.(GETPOST('prod_entry_mode')=='free'?' checked="true"':'').'> ';
|
||||
// If module product and service disabled, by default this is a product except for contracts it is a service
|
||||
print '<input type="hidden" name="type" value="'.((! empty($object->element) && $object->element == 'contrat')?'1':'0').'">';
|
||||
}
|
||||
else {
|
||||
if (! empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans("FreeLineOfType").' ';
|
||||
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans("FreeLineOfType").' '.$langs->trans("Service");
|
||||
else if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans("FreeLineOfType").' '.$langs->trans("Product");
|
||||
echo $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,1);
|
||||
echo $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,1,$forceall);
|
||||
}
|
||||
echo '</span>';
|
||||
|
||||
// Predefined product/service
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
echo '<br><span>';
|
||||
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked="true"':'').'> ';
|
||||
|
||||
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('RecordedProducts');
|
||||
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('RecordedServices');
|
||||
else echo $langs->trans('RecordedProductsAndServices');
|
||||
if (empty($senderissupplier))
|
||||
{
|
||||
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToBuy');
|
||||
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToBuy');
|
||||
else echo $langs->trans('PredefinedProductsAndServicesToBuy');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase');
|
||||
else if (empty($conf->product->enabled) && ! empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase');
|
||||
else echo $langs->trans('PredefinedProductsAndServicesToPurchase');
|
||||
}
|
||||
echo ' ';
|
||||
|
||||
$filtertype='';
|
||||
if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1';
|
||||
$form->select_produits('','idprod',$filtertype,$conf->product->limit_size,$buyer->price_level, 1, 2, '', 3, array(),$buyer->id);
|
||||
|
||||
if (empty($senderissupplier))
|
||||
{
|
||||
$form->select_produits('', 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ajaxoptions=array(
|
||||
'update' => array('qty'=>'qty','remise_percent' => 'discount'), // html id tag will be edited with which ajax json response key
|
||||
'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
|
||||
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
|
||||
);
|
||||
$form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1);
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
if (is_object($hookmanager))
|
||||
if (is_object($hookmanager) && empty($senderissupplier))
|
||||
{
|
||||
$parameters=array('fk_parent_line'=>GETPOST('fk_parent_line','int'));
|
||||
$reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
|
||||
}
|
||||
if (is_object($hookmanager) && ! empty($senderissupplier))
|
||||
{
|
||||
$parameters=array('htmlname'=>'addproduct');
|
||||
$reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action);
|
||||
}
|
||||
|
||||
//if ((! empty($conf->product->enabled) && ! empty($conf->service->enabled)) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '<br>';
|
||||
echo '<br>';
|
||||
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) echo '<br>';
|
||||
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@@ -141,14 +178,25 @@ else {
|
||||
</td>
|
||||
|
||||
<td align="right"><?php
|
||||
if (GETPOST('prod_entry_mode') != 'predef')
|
||||
{
|
||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" value="0">0';
|
||||
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td align="right">
|
||||
<?php if (GETPOST('prod_entry_mode') != 'predef') { ?>
|
||||
<input type="text" size="5" name="price_ht" id="price_ht" class="flat" value="<?php echo (isset($_POST["price_ht"])?$_POST["price_ht"]:''); ?>">
|
||||
<input type="hidden" name="price_ht_predef" id="price_ht_predef">
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php if (! empty($inputalsopricewithtax)) { ?>
|
||||
<td align="right">
|
||||
<?php if (GETPOST('prod_entry_mode') != 'predef') { ?>
|
||||
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"])?$_POST["price_ttc"]:''); ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td align="right"><input type="text" size="2" name="qty" class="flat" value="<?php echo (isset($_POST["qty"])?$_POST["qty"]:1); ?>">
|
||||
</td>
|
||||
<td align="right" class="nowrap"><input type="text" size="1" class="flat" value="<?php echo (isset($_POST["remise_percent"])?$_POST["remise_percent"]:$buyer->remise_client); ?>" name="remise_percent"><span class="hideonsmartphone">%</span></td>
|
||||
@@ -229,35 +277,37 @@ if (! empty($conf->service->enabled) && $dateSelector)
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<tr id="trlinefordates" <?php echo $bcnd[$var]; ?>>
|
||||
<td colspan="<?php echo $colspan; ?>">
|
||||
<?php
|
||||
$date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||
$date_end=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||
if (! empty($object->element) && $object->element == 'contrat')
|
||||
{
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date('',"date_start",$usehm,$usehm,1,"addproduct");
|
||||
$form->select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct");
|
||||
print ' '.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date('',"date_end",$usehm,$usehm,1,"addproduct");
|
||||
$form->select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
|
||||
echo $form->select_date('','date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
|
||||
echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
|
||||
echo ' '.$langs->trans('to').' ';
|
||||
echo $form->select_date('','date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
|
||||
echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
if (! empty($usemargins) && $user->rights->margins->creer)
|
||||
{
|
||||
?>
|
||||
@@ -377,14 +427,18 @@ jQuery(document).ready(function() {
|
||||
{
|
||||
setforfree();
|
||||
if (jQuery('#select_type').val() >= 0) jQuery('#dp_desc').focus();
|
||||
if (jQuery('#select_type').val() == '0') jQuery('#trlinefordates').hide();
|
||||
else jQuery('#trlinefordates').show();
|
||||
});
|
||||
|
||||
$("#prod_entry_mode_predef").on( "click", function() {
|
||||
setforpredef();
|
||||
jQuery('#trlinefordates').show();
|
||||
});
|
||||
$("#idprod").change(function()
|
||||
$("#idprod, #idprodfournprice").change(function()
|
||||
{
|
||||
setforpredef();
|
||||
jQuery('#trlinefordates').show();
|
||||
|
||||
<?php if (! empty($usemargins) && $user->rights->margins->creer) { ?>
|
||||
|
||||
@@ -420,9 +474,11 @@ jQuery(document).ready(function() {
|
||||
},
|
||||
'json');
|
||||
|
||||
if (jQuery('#idprod').val() > 0) jQuery('#dp_desc').focus();
|
||||
|
||||
<?php } ?>
|
||||
|
||||
/* To set focus */
|
||||
if (jQuery('#idprod').val() > 0) jQuery('#dp_desc').focus();
|
||||
if (jQuery('#idprodfournprice').val() > 0) jQuery('#dp_desc').focus();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -430,6 +486,8 @@ jQuery(document).ready(function() {
|
||||
function setforfree() {
|
||||
jQuery("#search_idprod").val('');
|
||||
jQuery("#idprod").val('');
|
||||
jQuery("#idprodfournprice").val('');
|
||||
jQuery("#search_idprodfournprice").val('');
|
||||
jQuery("#prod_entry_mode_free").attr('checked',true);
|
||||
jQuery("#prod_entry_mode_predef").attr('checked',false);
|
||||
jQuery("#price_ht").show();
|
||||
@@ -438,6 +496,7 @@ function setforfree() {
|
||||
jQuery("#fournprice_predef").hide();
|
||||
jQuery("#title_vat").show();
|
||||
jQuery("#title_up_ht").show();
|
||||
jQuery("#title_up_ttc").show();
|
||||
}
|
||||
function setforpredef() {
|
||||
jQuery("#select_type").val(-1);
|
||||
@@ -448,6 +507,7 @@ function setforpredef() {
|
||||
jQuery("#buying_price").show();
|
||||
jQuery("#title_vat").hide();
|
||||
jQuery("#title_up_ht").hide();
|
||||
jQuery("#title_up_ttc").hide();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1066,9 +1066,11 @@ class CommandeFournisseur extends CommonOrder
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $info_bits More information
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param timestamp $date_start Date start of service
|
||||
* @param timestamp $date_end Date end of service
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0, $notrigger=false)
|
||||
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0, $notrigger=false, $date_start='', $date_end='')
|
||||
{
|
||||
global $langs,$mysoc;
|
||||
|
||||
@@ -1172,12 +1174,14 @@ class CommandeFournisseur extends CommonOrder
|
||||
$subprice = price2num($pu,'MU');
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
|
||||
$sql.= " (fk_commande, label, description,";
|
||||
$sql.= " (fk_commande, label, description, date_start, date_end,";
|
||||
$sql.= " fk_product, product_type,";
|
||||
$sql.= " qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,";
|
||||
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc";
|
||||
$sql.= ")";
|
||||
$sql.= " VALUES (".$this->id.", '" . $this->db->escape($label) . "','" . $this->db->escape($desc) . "',";
|
||||
$sql.= " ".($date_start?"'".$this->db->idate($date_start)."'":"null").",";
|
||||
$sql.= " ".($date_end?"'".$this->db->idate($date_end)."'":"null").",";
|
||||
if ($fk_product) { $sql.= $fk_product.","; }
|
||||
else { $sql.= "null,"; }
|
||||
$sql.= "'".$product_type."',";
|
||||
|
||||
@@ -180,51 +180,45 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
$error = 0;
|
||||
|
||||
// Set if we used free entry or predefined product
|
||||
if (GETPOST('addline_libre')
|
||||
|| (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field
|
||||
)
|
||||
{
|
||||
$predef='';
|
||||
$idprod=0;
|
||||
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
}
|
||||
if (GETPOST('addline_predefined')
|
||||
|| (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field
|
||||
)
|
||||
if (GETPOST('prod_entry_mode') == 'free')
|
||||
{
|
||||
$idprod=0;
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
$predef= '_predef';
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):''));
|
||||
$price_ht = '';
|
||||
$tva_tx = '';
|
||||
}
|
||||
|
||||
$qty = GETPOST('qty'.$predef);
|
||||
$remise_percent=GETPOST('remise_percent'.$predef);
|
||||
if (GETPOST('addline_libre') && GETPOST('pu') < 0 && $qty < 0)
|
||||
|
||||
if (GETPOST('prod_entry_mode')=='free' && GETPOST('price_ht') < 0 && $qty < 0)
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPrice'), $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (GETPOST('addline_libre') && ! GETPOST('idprodfournprice') && GETPOST('type') < 0)
|
||||
if (GETPOST('prod_entry_mode')=='free' && ! GETPOST('idprodfournprice') && GETPOST('type') < 0)
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('addline_predefined') && ( GETPOST('pu')==='')) // Unit price can be 0 but not ''
|
||||
if (GETPOST('prod_entry_mode')=='free' && GETPOST('price_ht')==='' && GETPOST('price_ttc')==='') // Unit price can be 0 but not ''
|
||||
{
|
||||
|
||||
setEventMessage($langs->trans($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('UnitPrice'))), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! GETPOST('addline_predefined') && ! GETPOST('np_desc') && ! GETPOST('dp_desc'))
|
||||
if (GETPOST('prod_entry_mode')=='free' && ! GETPOST('dp_desc'))
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ((! GETPOST('addline_predefined') && (! GETPOST('qty') || GETPOST('qty') == ''))
|
||||
|| (GETPOST('addline_predefined') && (! GETPOST('qty_predef') || GETPOST('qty_predef') == '')))
|
||||
if (! GETPOST('qty'))
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error++;
|
||||
@@ -233,18 +227,16 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
if (GETPOST('addline_predefined') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
if (GETPOST('prod_entry_mode') != 'free') // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
{
|
||||
$idprod=0;
|
||||
$productsupplier = new ProductFournisseur($db);
|
||||
|
||||
if (GETPOST('idprodfournprice') == '')
|
||||
{
|
||||
$idprod=-1;
|
||||
}
|
||||
if (GETPOST('idprodfournprice') == -1 || GETPOST('idprodfournprice') == '') $idprod=-2; // Same behaviour than with combolist. When not select idprodfournprice is now -2 (to avoid conflict with next action that may return -1)
|
||||
|
||||
if (GETPOST('idprodfournprice') > 0)
|
||||
{
|
||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat
|
||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat.
|
||||
}
|
||||
|
||||
if ($idprod > 0)
|
||||
@@ -278,7 +270,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
$type
|
||||
);
|
||||
}
|
||||
if ($idprod == 0)
|
||||
if ($idprod == -2 || $idprod == 0)
|
||||
{
|
||||
// Product not selected
|
||||
$error++;
|
||||
@@ -293,37 +285,36 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors');
|
||||
}
|
||||
}
|
||||
else if( GETPOST('pu')!=='' || GETPOST('amountttc')!=='' )
|
||||
else if( GETPOST('price_ht')!=='' || GETPOST('price_ttc')!=='' )
|
||||
{
|
||||
$type=$_POST["type"];
|
||||
$desc=$_POST['dp_desc'];
|
||||
$tva_tx = price2num($_POST['tva_tx']);
|
||||
$pu_ht = price2num($price_ht, 'MU');
|
||||
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');
|
||||
$tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0);
|
||||
$tva_tx = str_replace('*', '', $tva_tx);
|
||||
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
||||
$desc = $product_desc;
|
||||
$type = GETPOST('type');
|
||||
|
||||
$tva_tx = price2num($tva_tx); // When vat is text input field
|
||||
|
||||
// Local Taxes
|
||||
$localtax1_tx= get_localtax($tva_tx, 1,$mysoc,$object->thirdparty);
|
||||
$localtax2_tx= get_localtax($tva_tx, 2,$mysoc,$object->thirdparty);
|
||||
|
||||
if (! $product_desc)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!empty($_POST['pu']))
|
||||
if (!empty($_POST['price_ht']))
|
||||
{
|
||||
$price_base_type = 'HT';
|
||||
$ht = price2num($_POST['pu']);
|
||||
$ht = price2num($_POST['price_ht']);
|
||||
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, 0, $type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ttc = price2num($_POST['amountttc']);
|
||||
$ttc = price2num($_POST['price_ttc']);
|
||||
$ht = $ttc / (1 + ($tauxtva / 100));
|
||||
$price_base_type = 'HT';
|
||||
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//print "xx".$tva_tx; exit;
|
||||
if (! $error && $result > 0)
|
||||
@@ -345,22 +336,35 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
unset($_POST ['prod_entry_mode']);
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
unset($_POST['remise_percent']);
|
||||
unset($_POST['dp_desc']);
|
||||
unset($_POST['pu']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['price_ttc']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['label']);
|
||||
unset($localtax1_tx);
|
||||
unset($localtax2_tx);
|
||||
|
||||
unset($_POST['np_marginRate']);
|
||||
unset($_POST['np_markRate']);
|
||||
unset($_POST['dp_desc']);
|
||||
unset($_POST['idprodfournprice']);
|
||||
unset($_POST['qty_predef']);
|
||||
unset($_POST['remise_percent_predef']);
|
||||
unset($_POST['fournprice_predef']);
|
||||
unset($_POST['buying_price_predef']);
|
||||
unset($_POST['np_desc']);
|
||||
|
||||
unset($_POST['date_starthour']);
|
||||
unset($_POST['date_startmin']);
|
||||
unset($_POST['date_startsec']);
|
||||
unset($_POST['date_startday']);
|
||||
unset($_POST['date_startmonth']);
|
||||
unset($_POST['date_startyear']);
|
||||
unset($_POST['date_endhour']);
|
||||
unset($_POST['date_endmin']);
|
||||
unset($_POST['date_endsec']);
|
||||
unset($_POST['date_endday']);
|
||||
unset($_POST['date_endmonth']);
|
||||
unset($_POST['date_endyear']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1653,12 +1657,12 @@ elseif (! empty($object->id))
|
||||
|
||||
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_line&rowid='.$line->id.'#'.$line->id.'">';
|
||||
print '<td align="center" width="16"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_line&rowid='.$line->id.'#'.$line->id.'">';
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
$actiondelete='delete_product_line';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action='.$actiondelete.'&lineid='.$line->id.'">';
|
||||
print '<td align="center" width="16"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action='.$actiondelete.'&lineid='.$line->id.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -1723,13 +1727,10 @@ elseif (! empty($object->id))
|
||||
$i++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Form to add new line
|
||||
*/
|
||||
// Form to add new line
|
||||
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer && $action <> 'edit_line')
|
||||
{
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
/*print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<a name="add"></a>'; // ancre
|
||||
print $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone").'</td>';
|
||||
@@ -1738,11 +1739,26 @@ elseif (! empty($object->id))
|
||||
print '<td align="right">'.$langs->trans('Qty').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ReductionShort').'</td>';
|
||||
print '<td colspan="4"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// TODO Use the predefinedproductline_create.tpl.php file
|
||||
print '</tr>';*/
|
||||
|
||||
// Add free products/services form
|
||||
global $forceall, $senderissupplier, $dateSelector;
|
||||
$forceall=1; $senderissupplier=1; $dateSelector=0;
|
||||
if ($object->statut == 0 && $user->rights->propal->creer)
|
||||
{
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var = true;
|
||||
|
||||
// Add free products/services
|
||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$var=true;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
@@ -1805,6 +1821,7 @@ elseif (! empty($object->id))
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td colspan="3">';
|
||||
|
||||
|
||||
$ajaxoptions=array(
|
||||
'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
|
||||
'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
|
||||
@@ -1830,7 +1847,7 @@ elseif (! empty($object->id))
|
||||
print '<td align="right" class="nowrap"><input type="text" size="1" id="remise_percent_predef" name="remise_percent_predef" value="'.(GETPOST('remise_percent_predef')?GETPOST('remise_percent_predef'):$object->thirdparty->remise_percent).'"><span class="hideonsmartphone">%</span></td>';
|
||||
print '<td align="center" colspan="4"><input type="submit" id="addPredefinedProductButton" class="button" value="'.$langs->trans('Add').'" name="addline_predefined"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}*/
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -156,6 +156,12 @@ NoSupplierPriceDefinedForThisProduct=No supplier price/qty defined for this prod
|
||||
RecordedProducts=Products recorded
|
||||
RecordedServices=Services recorded
|
||||
RecordedProductsAndServices=Products/services recorded
|
||||
PredefinedProductsToBuy=Predefined products to buy
|
||||
PredefinedServicesToBuy=Predefined services to buy
|
||||
PredefinedProductsAndServicesToBuy=Predefined products/services to buy
|
||||
PredefinedProductsToPurchase=Predefined product to purchase
|
||||
PredefinedServicesToPurchase=Predefined services to purchase
|
||||
PredefinedProductsAndServicesToPurchase=Predefined products/services to puchase
|
||||
GenerateThumb=Generate thumb
|
||||
ProductCanvasAbility=Use special "canvas" addons
|
||||
ServiceNb=Service #%s
|
||||
|
||||
Reference in New Issue
Block a user