UOM Conversion in selling
This commit is contained in:
parent
5a980ac87a
commit
e68f32cf19
@ -790,11 +790,11 @@ def make_delivery_note(source_name, target_doc=None):
|
|||||||
target.run_method("calculate_taxes_and_totals")
|
target.run_method("calculate_taxes_and_totals")
|
||||||
|
|
||||||
def update_item(source_doc, target_doc, source_parent):
|
def update_item(source_doc, target_doc, source_parent):
|
||||||
target_doc.base_amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
|
target_doc.qty = flt(source_doc.qty) - flt(source_doc.delivered_qty)
|
||||||
flt(source_doc.base_rate)
|
target_doc.stock_qty = target_doc.qty * flt(source_doc.conversion_factor)
|
||||||
target_doc.amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
|
|
||||||
flt(source_doc.rate)
|
target_doc.base_amount = target_doc.qty * flt(source_doc.base_rate)
|
||||||
target_doc.qty = flt(source_doc.qty) - flt(source_doc.delivered_qty) * flt(source_doc.conversion_factor)
|
target_doc.amount = target_doc.qty * flt(source_doc.rate)
|
||||||
|
|
||||||
doclist = get_mapped_doc("Sales Invoice", source_name, {
|
doclist = get_mapped_doc("Sales Invoice", source_name, {
|
||||||
"Sales Invoice": {
|
"Sales Invoice": {
|
||||||
|
@ -254,7 +254,7 @@ class GrossProfitGenerator(object):
|
|||||||
si.customer, si.customer_group, si.territory,
|
si.customer, si.customer_group, si.territory,
|
||||||
item.item_code, item.item_name, item.description, item.warehouse,
|
item.item_code, item.item_name, item.description, item.warehouse,
|
||||||
item.item_group, item.brand, item.dn_detail, item.delivery_note,
|
item.item_group, item.brand, item.dn_detail, item.delivery_note,
|
||||||
item.qty, item.base_net_rate, item.base_net_amount, item.name as "item_row",
|
item.stock_qty as qty, item.base_net_rate, item.base_net_amount, item.name as "item_row",
|
||||||
sales.sales_person, sales.allocated_amount, sales.incentives
|
sales.sales_person, sales.allocated_amount, sales.incentives
|
||||||
from `tabSales Invoice` si
|
from `tabSales Invoice` si
|
||||||
inner join `tabSales Invoice Item` item on item.parent = si.name
|
inner join `tabSales Invoice Item` item on item.parent = si.name
|
||||||
|
@ -220,7 +220,7 @@ class SellingController(StockController):
|
|||||||
il.append(frappe._dict({
|
il.append(frappe._dict({
|
||||||
'warehouse': d.warehouse,
|
'warehouse': d.warehouse,
|
||||||
'item_code': d.item_code,
|
'item_code': d.item_code,
|
||||||
'qty': d.qty,
|
'qty': d.stock_qty,
|
||||||
'uom': d.uom,
|
'uom': d.uom,
|
||||||
'stock_uom': d.stock_uom,
|
'stock_uom': d.stock_uom,
|
||||||
'conversion_factor': d.conversion_factor,
|
'conversion_factor': d.conversion_factor,
|
||||||
@ -294,8 +294,6 @@ class SellingController(StockController):
|
|||||||
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 and flt(d.qty):
|
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 and flt(d.qty):
|
||||||
if flt(d.conversion_factor)==0.0:
|
if flt(d.conversion_factor)==0.0:
|
||||||
d.conversion_factor = get_conversion_factor(d.item_code, d.uom).get("conversion_factor") or 1.0
|
d.conversion_factor = get_conversion_factor(d.item_code, d.uom).get("conversion_factor") or 1.0
|
||||||
|
|
||||||
qty_in_stock_uom = flt(d.qty * d.conversion_factor)
|
|
||||||
return_rate = 0
|
return_rate = 0
|
||||||
if cint(self.is_return) and self.return_against and self.docstatus==1:
|
if cint(self.is_return) and self.return_against and self.docstatus==1:
|
||||||
return_rate = self.get_incoming_rate_for_sales_return(d.item_code, self.return_against)
|
return_rate = self.get_incoming_rate_for_sales_return(d.item_code, self.return_against)
|
||||||
@ -306,13 +304,13 @@ class SellingController(StockController):
|
|||||||
if d.warehouse and ((not cint(self.is_return) and self.docstatus==1)
|
if d.warehouse and ((not cint(self.is_return) and self.docstatus==1)
|
||||||
or (cint(self.is_return) and self.docstatus==2)):
|
or (cint(self.is_return) and self.docstatus==2)):
|
||||||
sl_entries.append(self.get_sl_entries(d, {
|
sl_entries.append(self.get_sl_entries(d, {
|
||||||
"actual_qty": -1*qty_in_stock_uom,
|
"actual_qty": -1*flt(d.qty),
|
||||||
"incoming_rate": return_rate
|
"incoming_rate": return_rate
|
||||||
}))
|
}))
|
||||||
|
|
||||||
if d.target_warehouse:
|
if d.target_warehouse:
|
||||||
target_warehouse_sle = self.get_sl_entries(d, {
|
target_warehouse_sle = self.get_sl_entries(d, {
|
||||||
"actual_qty": qty_in_stock_uom,
|
"actual_qty": flt(d.qty),
|
||||||
"warehouse": d.target_warehouse
|
"warehouse": d.target_warehouse
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -338,7 +336,7 @@ class SellingController(StockController):
|
|||||||
if d.warehouse and ((not cint(self.is_return) and self.docstatus==2)
|
if d.warehouse and ((not cint(self.is_return) and self.docstatus==2)
|
||||||
or (cint(self.is_return) and self.docstatus==1)):
|
or (cint(self.is_return) and self.docstatus==1)):
|
||||||
sl_entries.append(self.get_sl_entries(d, {
|
sl_entries.append(self.get_sl_entries(d, {
|
||||||
"actual_qty": -1*qty_in_stock_uom,
|
"actual_qty": -1*flt(d.qty),
|
||||||
"incoming_rate": return_rate
|
"incoming_rate": return_rate
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
@ -147,9 +147,9 @@ def period_wise_columns_query(filters, trans):
|
|||||||
else:
|
else:
|
||||||
pwc = [_(filters.get("fiscal_year")) + " ("+_("Qty") + "):Float:120",
|
pwc = [_(filters.get("fiscal_year")) + " ("+_("Qty") + "):Float:120",
|
||||||
_(filters.get("fiscal_year")) + " ("+ _("Amt") + "):Currency:120"]
|
_(filters.get("fiscal_year")) + " ("+ _("Amt") + "):Currency:120"]
|
||||||
query_details = " SUM(t2.qty), SUM(t2.base_net_amount),"
|
query_details = " SUM(t2.stock_qty), SUM(t2.base_net_amount),"
|
||||||
|
|
||||||
query_details += 'SUM(t2.qty), SUM(t2.base_net_amount)'
|
query_details += 'SUM(t2.stock_qty), SUM(t2.base_net_amount)'
|
||||||
return pwc, query_details
|
return pwc, query_details
|
||||||
|
|
||||||
def get_period_wise_columns(bet_dates, period, pwc):
|
def get_period_wise_columns(bet_dates, period, pwc):
|
||||||
@ -161,7 +161,7 @@ def get_period_wise_columns(bet_dates, period, pwc):
|
|||||||
_(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Amt") + "):Currency:120"]
|
_(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Amt") + "):Currency:120"]
|
||||||
|
|
||||||
def get_period_wise_query(bet_dates, trans_date, query_details):
|
def get_period_wise_query(bet_dates, trans_date, query_details):
|
||||||
query_details += """SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.qty, NULL)),
|
query_details += """SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.stock_qty, NULL)),
|
||||||
SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.base_net_amount, NULL)),
|
SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.base_net_amount, NULL)),
|
||||||
""" % {"trans_date": trans_date, "sd": bet_dates[0],"ed": bet_dates[1]}
|
""" % {"trans_date": trans_date, "sd": bet_dates[0],"ed": bet_dates[1]}
|
||||||
return query_details
|
return query_details
|
||||||
|
@ -90,7 +90,7 @@ class ProductionOrder(Document):
|
|||||||
total_qty = flt(ordered_qty_against_so) + flt(self.qty)
|
total_qty = flt(ordered_qty_against_so) + flt(self.qty)
|
||||||
|
|
||||||
# get qty from Sales Order Item table
|
# get qty from Sales Order Item table
|
||||||
so_item_qty = frappe.db.sql("""select sum(qty) from `tabSales Order Item`
|
so_item_qty = frappe.db.sql("""select sum(stock_qty) from `tabSales Order Item`
|
||||||
where parent = %s and item_code = %s""",
|
where parent = %s and item_code = %s""",
|
||||||
(self.sales_order, self.production_item))[0][0]
|
(self.sales_order, self.production_item))[0][0]
|
||||||
# get qty from Packing Item table
|
# get qty from Packing Item table
|
||||||
|
@ -134,7 +134,7 @@ class ProductionPlanningTool(Document):
|
|||||||
item_condition = ' and so_item.item_code = "{0}"'.format(frappe.db.escape(self.fg_item))
|
item_condition = ' and so_item.item_code = "{0}"'.format(frappe.db.escape(self.fg_item))
|
||||||
|
|
||||||
items = frappe.db.sql("""select distinct parent, item_code, warehouse,
|
items = frappe.db.sql("""select distinct parent, item_code, warehouse,
|
||||||
(qty - delivered_qty) as pending_qty
|
(qty - delivered_qty)*conversion_factor as pending_qty
|
||||||
from `tabSales Order Item` so_item
|
from `tabSales Order Item` so_item
|
||||||
where parent in (%s) and docstatus = 1 and qty > delivered_qty
|
where parent in (%s) and docstatus = 1 and qty > delivered_qty
|
||||||
and exists (select name from `tabBOM` bom where bom.item=so_item.item_code
|
and exists (select name from `tabBOM` bom where bom.item=so_item.item_code
|
||||||
|
@ -274,7 +274,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
doctype: me.frm.doc.doctype,
|
doctype: me.frm.doc.doctype,
|
||||||
name: me.frm.doc.name,
|
name: me.frm.doc.name,
|
||||||
project: item.project || me.frm.doc.project,
|
project: item.project || me.frm.doc.project,
|
||||||
qty: item.qty
|
qty: item.qty,
|
||||||
|
stock_qty: item.stock_qty
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -318,7 +319,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
refresh_field("serial_no", item.name, item.parentfield);
|
refresh_field("serial_no", item.name, item.parentfield);
|
||||||
if(!doc.is_return) {
|
if(!doc.is_return) {
|
||||||
frappe.model.set_value(item.doctype, item.name, "qty", sr_no.length);
|
frappe.model.set_value(item.doctype, item.name,
|
||||||
|
"qty", sr_no.length / item.conversion_factor);
|
||||||
|
frappe.model.set_value(item.doctype, item.name, "stock_qty", sr_no.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ class SalesOrder(SellingController):
|
|||||||
item_code= i.item_code,
|
item_code= i.item_code,
|
||||||
bom = bom,
|
bom = bom,
|
||||||
warehouse = i.warehouse,
|
warehouse = i.warehouse,
|
||||||
pending_qty= i.qty - flt(frappe.db.sql('''select sum(qty) from `tabProduction Order`
|
pending_qty= i.stock_qty - flt(frappe.db.sql('''select sum(qty) from `tabProduction Order`
|
||||||
where production_item=%s and sales_order=%s''', (i.item_code, self.name))[0][0])
|
where production_item=%s and sales_order=%s''', (i.item_code, self.name))[0][0])
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -394,7 +394,8 @@ def make_material_request(source_name, target_doc=None):
|
|||||||
"doctype": "Material Request Item",
|
"doctype": "Material Request Item",
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"parent": "sales_order",
|
"parent": "sales_order",
|
||||||
"stock_uom": "uom"
|
"stock_uom": "uom",
|
||||||
|
"stock_qty": "qty"
|
||||||
},
|
},
|
||||||
"condition": lambda doc: not frappe.db.exists('Product Bundle', doc.item_code),
|
"condition": lambda doc: not frappe.db.exists('Product Bundle', doc.item_code),
|
||||||
"postprocess": update_item
|
"postprocess": update_item
|
||||||
|
@ -20,7 +20,7 @@ def execute(filters=None):
|
|||||||
data.append([
|
data.append([
|
||||||
d.name, d.customer, d.territory, d.posting_date, d.item_code,
|
d.name, d.customer, d.territory, d.posting_date, d.item_code,
|
||||||
item_details.get(d.item_code, {}).get("item_group"), item_details.get(d.item_code, {}).get("brand"),
|
item_details.get(d.item_code, {}).get("item_group"), item_details.get(d.item_code, {}).get("brand"),
|
||||||
d.qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt
|
d.stock_qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt
|
||||||
])
|
])
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
|
@ -92,7 +92,7 @@ def get_achieved_details(filters, territory, item_groups):
|
|||||||
|
|
||||||
item_details = frappe.db.sql("""
|
item_details = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
soi.item_code, sum(soi.stock_qty) as qty sum(soi.base_net_amount) as amount,
|
soi.item_code, sum(soi.stock_qty) as qty, sum(soi.base_net_amount) as amount,
|
||||||
MONTHNAME(so.transaction_date) as month_name
|
MONTHNAME(so.transaction_date) as month_name
|
||||||
from
|
from
|
||||||
`tabSales Order Item` soi, `tabSales Order` so
|
`tabSales Order Item` soi, `tabSales Order` so
|
||||||
|
@ -121,7 +121,7 @@ data_map = {
|
|||||||
},
|
},
|
||||||
"Purchase Order Item": {
|
"Purchase Order Item": {
|
||||||
"columns": ["item.name as name", "item_code", "warehouse",
|
"columns": ["item.name as name", "item_code", "warehouse",
|
||||||
"(qty - received_qty) as qty"],
|
"(qty - received_qty)*conversion_factor as qty"],
|
||||||
"from": "`tabPurchase Order Item` item, `tabPurchase Order` main",
|
"from": "`tabPurchase Order Item` item, `tabPurchase Order` main",
|
||||||
"conditions": ["item.parent = main.name", "main.docstatus=1", "main.status != 'Stopped'",
|
"conditions": ["item.parent = main.name", "main.docstatus=1", "main.status != 'Stopped'",
|
||||||
"ifnull(warehouse, '')!=''", "qty > received_qty"],
|
"ifnull(warehouse, '')!=''", "qty > received_qty"],
|
||||||
@ -132,7 +132,7 @@ data_map = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Sales Order Item": {
|
"Sales Order Item": {
|
||||||
"columns": ["item.name as name", "item_code", "(qty - delivered_qty) as qty", "warehouse"],
|
"columns": ["item.name as name", "item_code", "(qty - delivered_qty)*conversion_factor as qty", "warehouse"],
|
||||||
"from": "`tabSales Order Item` item, `tabSales Order` main",
|
"from": "`tabSales Order Item` item, `tabSales Order` main",
|
||||||
"conditions": ["item.parent = main.name", "main.docstatus=1", "main.status != 'Stopped'",
|
"conditions": ["item.parent = main.name", "main.docstatus=1", "main.status != 'Stopped'",
|
||||||
"ifnull(warehouse, '')!=''", "qty > delivered_qty"],
|
"ifnull(warehouse, '')!=''", "qty > delivered_qty"],
|
||||||
@ -173,7 +173,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Sales Invoice Item": {
|
"Sales Invoice Item": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
@ -191,7 +191,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Sales Order Item[Sales Analytics]": {
|
"Sales Order Item[Sales Analytics]": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
@ -209,7 +209,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Delivery Note Item[Sales Analytics]": {
|
"Delivery Note Item[Sales Analytics]": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
@ -241,7 +241,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Purchase Invoice Item": {
|
"Purchase Invoice Item": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
@ -259,7 +259,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Purchase Order Item[Purchase Analytics]": {
|
"Purchase Order Item[Purchase Analytics]": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
@ -277,7 +277,7 @@ data_map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Purchase Receipt Item[Purchase Analytics]": {
|
"Purchase Receipt Item[Purchase Analytics]": {
|
||||||
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
|
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
|
||||||
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
|
||||||
"order_by": "parent",
|
"order_by": "parent",
|
||||||
"links": {
|
"links": {
|
||||||
|
@ -176,6 +176,8 @@ erpnext.stock.move_item = function(item, source, target, actual_qty, rate, callb
|
|||||||
row.f_warehouse = dialog.get_value('target');
|
row.f_warehouse = dialog.get_value('target');
|
||||||
row.t_warehouse = dialog.get_value('target');
|
row.t_warehouse = dialog.get_value('target');
|
||||||
row.qty = dialog.get_value('qty');
|
row.qty = dialog.get_value('qty');
|
||||||
|
row.conversion_factor = 1;
|
||||||
|
row.transfer_qty = dialog.get_value('qty');
|
||||||
row.basic_rate = dialog.get_value('rate');
|
row.basic_rate = dialog.get_value('rate');
|
||||||
frappe.set_route('Form', doc.doctype, doc.name);
|
frappe.set_route('Form', doc.doctype, doc.name);
|
||||||
})
|
})
|
||||||
|
@ -46,7 +46,7 @@ class MaterialRequest(BuyingController):
|
|||||||
docstatus = 1 and parent != %s""", (item, so_no, self.name))
|
docstatus = 1 and parent != %s""", (item, so_no, self.name))
|
||||||
already_indented = already_indented and flt(already_indented[0][0]) or 0
|
already_indented = already_indented and flt(already_indented[0][0]) or 0
|
||||||
|
|
||||||
actual_so_qty = frappe.db.sql("""select sum(qty) from `tabSales Order Item`
|
actual_so_qty = frappe.db.sql("""select sum(stock_qty) from `tabSales Order Item`
|
||||||
where parent = %s and item_code = %s and docstatus = 1""", (so_no, item))
|
where parent = %s and item_code = %s and docstatus = 1""", (so_no, item))
|
||||||
actual_so_qty = actual_so_qty and flt(actual_so_qty[0][0]) or 0
|
actual_so_qty = actual_so_qty and flt(actual_so_qty[0][0]) or 0
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
var args = {
|
var args = {
|
||||||
'item_code' : d.item_code,
|
'item_code' : d.item_code,
|
||||||
'warehouse' : cstr(d.s_warehouse),
|
'warehouse' : cstr(d.s_warehouse),
|
||||||
'qty' : d.qty
|
'stock_qty' : d.transfer_qty
|
||||||
};
|
};
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.stock.get_item_details.get_serial_no",
|
method: "erpnext.stock.get_item_details.get_serial_no",
|
||||||
|
@ -510,7 +510,7 @@ def get_valuation_rate(item_code, warehouse=None):
|
|||||||
["valuation_rate"], as_dict=True) or {"valuation_rate": 0}
|
["valuation_rate"], as_dict=True) or {"valuation_rate": 0}
|
||||||
|
|
||||||
elif not item.is_stock_item:
|
elif not item.is_stock_item:
|
||||||
valuation_rate =frappe.db.sql("""select sum(base_net_amount) / sum(qty)
|
valuation_rate =frappe.db.sql("""select sum(base_net_amount) / sum(stock_qty)
|
||||||
from `tabPurchase Invoice Item`
|
from `tabPurchase Invoice Item`
|
||||||
where item_code = %s and docstatus=1""", item_code)
|
where item_code = %s and docstatus=1""", item_code)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user