Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

item.mrp.min.js 20KB

1
  1. var Unibase;(function(n){let t;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{constructor(){super(...arguments);this.Type="";this.PendingQty=0;this.SplitedInvoiceItemList=[];this.rowIndex=0;this.container="";this.DcItemIds=[]}jsFiles(){return["platform/controls/itemdetails/item.mrp.js"]}cssFiles(){return[]}load(){var n=this;$("#btn_InvoiceItem_Close").click(function(){n.navigationHelper.closePopUp()})}loadForm(){}html(){return'<div class="frm_Bizgazetransact_Invoice_createInvoiceItem card"><div class="card-header"><div class="row col-sm-12 ml-5"><strong class="titlename InvoiceItemName col-8"><\/strong><div class="col-4 pull-right"><span class="pull-right mr-10">Amount: <strong class="hf_nettotal">0.00<\/strong><\/span><\/div><\/div><\/div><div style="overflow-x:hidden;" class="d modal-body bg-light"><div class="bg-white mb-10"><span class="ml-10"> Pending: <span class="hf_pendingQty ml-5" > 0 <\/span><span>/Total Avail: <\/span><span class="hf_AvailQty ml-5">0<\/span > <\/span><\/div > <div class="card" > <div class="card-body"><div class="col-sm-12 d-none d-md-block"><div class="row " style="overflow-x:hidden;"><input type="hidden" id="hf_ItemId" ><div class="col-sm-4 min-padding"><strong class="EnabledType ml-20">MRP<\/strong> <\/div><div class="col-sm-2 text-center min-padding"><strong class="ml-15">Qty<\/strong><\/div><div class="col-sm-2 text-center min-padding"><strong>Unit Price<\/strong><\/div><div class="col-sm-2 text-center min-padding"><strong>Disc.<\/strong><\/div><div class="col-sm-2 text-right min-padding"><strong class="mr-15">Total<\/strong><\/div><\/div><\/div><div><div class="Mrp-row added-row hidden"><\/div><div class="Batch-row added-row hidden"><\/div><div class="Serial-row added-row hidden"><\/div><\/div><div class="row"><a href="javascript:;" class="default pull-left" title="Add" data-original-title="Add"><span class="pull-right btn" id="btnInvoice_Batch">Add<\/span><\/a><\/div><\/div><\/div><\/div><footer class="bg-white modal-footer"><a id="btn_InvoiceItem_Close" class="btn btn-light btn-sm mr-auto"> Close<\/a><a href="javascript:;" id="btn_InvoiceItem_Save_mobile" class="btn btn-primary btn-sm">Save<\/a><\/footer>'}init(n,t,r){var f,u,e;for($(".InvoiceItemName").text(t),$(".EnabledType").text(r),this.Type=r,this.SplitedInvoiceItemList.push({orderItemId:0,invoiceItemId:0,itemName:"test",itemId:0,itemSKU:0,unitName:0,packSize:0,packCount:0,packs:0,quantity:0,availPacks:0,availQty:0,listPrice:0,description:"",taxGroupName:"",taxGroupId:0,isTaxInclusive:$("#hfId_IsTaxInclusive").val(),addlDiscountPercent:0,addlDiscountValue:0,creditNote:0,priceListId:0,batchId:0,unitPrice:0,invoiceallocations:null,exciseInvoiceItem:null,accountId:0,accountName:"",walletId:0,Adjustment:0,IsFoc:0,TariffNo:"",exciseAmount:0,discountName:"",discountId:0,refNo:"",DiscountGroupId:0,DiscountGroupName:"",ExchangeItem:0,maxQty:0,RefInvoiceItemId:0,MrpId:0,taxAdjustment:0,assesableAdjustment:0,inventoryTypeId:0,IsBoMItem:0,dcItemId:0,TotalRowAmount:0,TotalDiscount:0,BatchId:0}),f=!1,u=0;u<this.SplitedInvoiceItemList.length;u++)this.SplitedInvoiceItemList[u].itemId==$("#hf_ItemId").val()&&(f=!0,i.Instance().addMrpRowWithData(this.SplitedInvoiceItemList[u]));$("#hf_ItemId").val(n.find(".selectedItemId").val());$(".hf_AvailQty").text(n.find(".prodAvail").text());$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_OrderId").val()!="0"&&$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_OrderId").val()!=undefined&&($(".hf_pendingQty").text(n.find(".maxQty").val()),this.PendingQty=n.find(".maxQty").val());$("#btnInvoice_Batch").click(function(){i.Instance().addMrpRow(n)});$("#btn_InvoiceItem_Save").click(function(){});$(document).click(function(){var n=$(".div_Item_MoreDetails")});f==!1&&(e=$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_OrderId").val());var o=$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_DcId").val(),s=$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_InvoiceId").val();(!1||(e=="0"||e==undefined)&&o!="0"&&o!=undefined&&(s=="0"||s=="null"))&&$("#btnInvoice_Batch").addClass("hidden")}addMrpRow(n){var t={orderItemId:n.find(".orderItemId").val(),invoiceItemId:0,itemId:n.find(".selectedItemId").val(),packSize:0,packCount:0,packs:0,quantity:0,availPacks:0,availQty:0,Description:"",isTaxInclusive:$("#hfIsTaxInclusive").val(),addlDiscountPercent:0,addlDiscountValue:0,creditNote:0,priceListId:n.find(".hf_PriceList").val(),invoiceallocations:null,exciseInvoiceItem:null,walletId:0,Adjustment:0,IsFoc:0,TariffNo:"",exciseAmount:0,discountName:"",discountId:0,description:"",RefNo:"",DiscountGroupId:0,DiscountGroupName:"",RefInvoiceItemId:0,taxAdjustment:n.find(".hfItemTaxAdjsutmentVal").val(),assesableAdjustment:n.find(".hfItemAssesableAdjustmentVal").val(),inventoryTypeId:0,dcItemId:0,ExchangeItem:n.find(".IsExchangeItem").val(),unitPrice:n.find(".prodPrice").val(),taxGroupId:$("#hf_TaxGroupId").val(),BatchId:0,MrpId:0,SerialId:0,Name:"",maxQty:0};i.Instance().addMrpRowWithData(t)}addMrpRowWithData(n){var e,u,t,r,h,o,v;this.rowIndex=$(".SplInvoiceItemRow").length+1;var y="",p="",w="",s="",f=0;n.addlDiscountPercent>0?(f=n.addlDiscountPercent,p="active",s="%"):n.addlDiscountValue>0&&n.DiscountGroupId>0?(f=n.addlDiscountValue,w="active",s="Mul"):(f=n.addlDiscountValue,y="active",s="Val");e="";r=="MRP"?e="Mrp-row Mrp-addedrow":r=="BatchNo"?e="Batch-row Batch-addedrow":r=="SerialNo"&&(e="Serial-row Serial-addedrow");var c="",b="",l="",a="";!0&&o==!1&&(a="readonly",c="readonly",b="readonly",l="readonly");$("#hfInv_Invoicetype").val()=="Sales"&&!0&&o==!1&&(l="readonly");u='<div class="row '+e+' form-group mt-20 SplInvoiceItemRow"><div class="row col-sm-12 ml-5"><input type="hidden" class="txt_rowIndex" value="'+this.rowIndex+'"/><input type="hidden" class="hf_orderItemId" value="'+n.orderItemId+'"/><input type="hidden" class="hf_dcItemId" value="'+n.dcItemId+'"/><input type="hidden" class="hf_selectedInvoiceItemId" value="'+n.invoiceItemId+'"/><input type="hidden" class="hf_refInvoiceItemId" value="'+n.RefInvoiceItemId+'"/><input type="hidden" class="hf_selectedItemId" value="'+n.itemId+'"/><input type="hidden" class="hf_offerapplied" value="0"/><input type="hidden" class="hf_refNo" value="'+n.RefNo+'"/><input type="hidden" class="hf_description" value="'+n.description+'"/><input type="hidden" class="hf_IsExchangeItem" value="'+n.ExchangeItem+'"/><input type="hidden" class="hf_ItemTaxAdjsutmentVal" value="'+n.taxAdjustment+'"/><input type="hidden" class="hf_ItemAssesableAdjustmentVal" value="'+n.assesableAdjustment+'"/><input type="hidden" class="hf_maxQty" value="'+n.maxQty+'" /><input type="hidden" class="exciseAmount" value="0"/><input type="hidden" class="hf_UnitPrice" value="'+n.unitPrice+'"/><input type="hidden" class="hf_'+r+'_Name" value=""/><div class="col-sm-4"><div class=" min-padding"><a class="no-border bg-white delete-row" href = "javascript:;" title = "Remove row" style = ""> <i class="fa fa-trash-o fa-lg mt-15 mr-2" style="margin-left:-25px;color:red"><\/i><\/a><select type="text" class=" required form-control ui-autocomplete select_'+r+'" id="select_itemMrp_'+this.rowIndex+'" data-required="true" value="" placeholder=" Select '+r+'" style="width:100%;" ><\/select><input type="hidden" id="hf_itemMrp_'+this.rowIndex+'" class="hf_'+r+'_Id"/><\/div><\/div><div class="col-sm-2"><div class="floating-label-form-group min-padding"><input type="text" class="Quantity text-center form-control" placeholder="0.00" value="'+n.quantity+'" '+a+'><\/div><\/div><div class="col-sm-2"><div class="floating-label-form-group min-padding"><input type="text" class="Price text-center form-control" placeholder="0.00" value="'+n.unitPrice+'" '+c+'/><\/div><\/div><div class="col-sm-2"><div class="floating-label-form-group"><input type="hidden" id="hf_ItemDiscountGroupId" value="'+n.DiscountGroupId+'" /><input type="hidden" id="hf_ItemDiscountGroupName" value="'+n.DiscountGroupName+'" /><input type="hidden" id="hf_ItemDiscountList" value=""/><input type="hidden" id="hf_ItemDiscountApplyTypes" value=""/><div class="input-group"><input type="text" id="txt_discount" placeholder="0.00" class="form-control txt_addldiscount text-center d-none d-md-block" value="'+f+'" readonlyDisc><input type="text" id="txt_discount" placeholder="0.00" class="form-control txt_addldiscount text-center ml-40 d-md-none" value="'+f+'" readonlyDisc><div class="input-group-btn"><div class="input-group-btn"><select class="btn_item_DiscType mt-10 border-blue"><option value="Val">Val<\/option><option value="%">%<\/option><\/select><\/div><\/div><\/div><\/div><\/div><div class="col-sm-2"><input type="hidden" class="hf_DiscountedAmount" value="0" /><input type="hidden" class="hf_RowTotalAdjustment" value="'+n.Adjustment+'" /><input type="hidden" class="hf_AssesableAdjustment" value="" /><input type="hidden" class="hf_TaxAdjustment" value="" />';$("#hfInv_Invoicetype").val()=="Purchase"||$("#hfInv_Invoicetype").val()=="PurchaseReturn"||$("#hfInv_Invoicetype").val()=="DebitNote"?(u+='<a href="javascript:;" class="AjustmentRow"><input type="text" style="color:#5ba8fb;text-decoration:underline;cursor:pointer" class="hf_RowTotalwithAdjustment form-control txt_RowTotalwithAdjustment text-right" value="0" /><\/a>',u+='<a href="javascript:;" class="hidden" onclick="javascript:_bizgazetransact_invoice_edit.editInvItemTaxAllocs('+n.invoiceItemId+","+n.TaxGroupId+","+n.itemId+","+n.orderItemId+')"><input type="text" style="color:#5ba8fb;text-decoration:underline;cursor:pointer" class="hf_RowTotal form-control txt_RowTotal text-right" value="0" /><\/a>'):u+='<p class="pull-right mt-10 mr-10"><strong><input type="hidden" class="hf_RowTotal" value="0" /><span class="TotalPrice">0.00<\/span><\/strong><\/p>';u+="<\/div><\/div >";u+='<div class="row col-sm-12 div_Item_MoreDetails clear hidden"><div class="row col-sm-12 bg-light ml-10 mt-5"><div class="col-sm-6"><div class="floating-label-form-group form-group floating-label focus"><label for="lbl_Description" id="lbl_Description">Description<\/label><input type="text" id="txt_Item_Description" data-isdynamic="false" class="form-control floating-label-control " data-placeholder="Enter Description" placeholder="Description" data-label="Description"/><\/div><\/div>';r!="MRP"&&(u+='<div class="col-sm-2 mt-30"><label for="lbl_Mrp" id="lbl_Mrp"><b>Mrp: &ensp;<span><\/span><\/b><\/label><span class="spn_Mrp">0<\/span><input type="hidden" class="hf_MrpId"/><\/div>');u+='<div class="col-sm-3 mt-30"><label for="lbl_Avalilability" id="lbl_Avalilability"><b>Availability: &ensp;<span><\/span><\/b><\/label><span class="spn_Avail">0<\/span><input type="hidden" class="hf_PriceList" value="'+n.priceListId+'"/><\/div><\/div><\/div><\/div>';t="";r="MRP";r=="MRP"?($(".Mrp-row:last").after(u),t=$(".Mrp-addedrow:last")):r=="BatchNo"?($(".Batch-row:last").after(u),t=$(".Batch-addedrow:last")):r=="SerialNo"&&($(".Serial-row:last").after(u),t=$(".Serial-addedrow:last"));t.find(".btn_item_DiscType option[value='"+s+"']").prop("selected",!0);n.description!=null&&n.description!=""&&n.description!="null"&&t.find("#txt_Item_Description").val(n.description);(n.orderItemId!=0&&n.dcItemId!=0&&h==1||n.orderItemId==0&&n.dcItemId!=0&&o==!1)&&t.find(".select_"+r+"").prop("disabled",!0);$(".txt_addldiscount").keypress(function(n){n.which>47&&n.which<58||n.which==46||n.which==8||n.preventDefault()}).on("paste",function(n){n.preventDefault()});$(".Quantity").keypress(function(n){n.which>47&&n.which<58||n.which==46||n.which==8||n.preventDefault()}).on("paste",function(n){n.preventDefault()});$(".Price").keypress(function(n){n.which>47&&n.which<58||n.which==46||n.which==8||n.preventDefault()}).on("paste",function(n){n.preventDefault()});this.Load(t);h=2;o=!1;n.dcItemId!=0&&h!=2&&o==!1&&t.find(".Quantity").prop("disabled",!0);(n.invoiceItemId!=0||n.dcItemId!=0||n.orderItemId!=0)&&(r=="MRP"?n.Name=t.find(".hf_"+r+"_Name").val():r=="BatchNo"?n.Name=t.find(".hf_"+r+"_Name").val():r=="SerialNo"&&(n.Name=t.find(".hf_"+r+"_Name").val()));n.Name!=""&&(r=="MRP"?n.MrpId!=0&&(t.find(".select_"+r+"").empty(),t.find(".select_"+r+"").append(new Option(n.Name,n.MrpId,!0)),t.find(".hf_"+r+"_Id").val(n.MrpId)):r=="BatchNo"?n.BatchId!=0&&(t.find(".select_"+r+"").empty(),t.find(".select_"+r+"").append(new Option(n.Name,n.BatchId,!0)),t.find(".hf_"+r+"_Id").val(n.BatchId)):r=="SerialNo"&&n.SerialId!=0&&(t.find(".select_"+r+"").empty(),t.find(".select_"+r+"").append(new Option(n.Name,n.SerialId,!0)),t.find(".hf_"+r+"_Id").val(n.SerialId)));t.find(".Price,.Quantity,.txt_addldiscount ").focusin(function(){$(".div_Item_MoreDetails").addClass("hidden");t.find(".div_Item_MoreDetails").removeClass("hidden")});t.find(".prodName").focusin(function(){$(".div_Item_MoreDetails").addClass("hidden")});t.find(".txt_addldiscount").change(function(){t.find(".btn_item_DiscType").val()=="%"&&Number(t.find(".txt_addldiscount").val())>100&&t.find(".txt_addldiscount").val("100")});t.find(".AjustmentRow").click(function(){});v=_appsettings.server_url()+"/apis/v4/unibase/transact/items/getitems/itemids/,/lobid/100284890000001";AutoCompleteHelper.getHelper().Create("#select_itemMrp_"+this.rowIndex,"#hf_itemMrp_"+this.rowIndex,v,function(n){var t=n});i.Instance().RemoveRow(t);t.find(".btn_item_DiscType").change(function(){t.find(".btn_item_DiscType").val()=="%"&&Number(t.find(".txt_addldiscount").val())>100&&t.find(".txt_addldiscount").val("100");t.find(".btn_item_DiscType option:selected").text().trim()=="Val"?(t.find("#hf_ItemDiscountGroupId").val(0),t.find("#hf_ItemDiscountGroupName").val(""),t.find(".txt_addldiscount").prop("disabled",!1)):t.find(".btn_item_DiscType option:selected").text().trim()=="%"&&(t.find("#hf_ItemDiscountGroupId").val(0),t.find("#hf_ItemDiscountGroupName").val(""),t.find(".txt_addldiscount").prop("disabled",!1))})}RemoveRow(n){n.find(".delete-row").on("click",function(){var t=$(this),r,i,n;if(t.parents(".SplInvoiceItemRow"),r=t.parents(".SplInvoiceItemRow").find(".hf_selectedInvoiceItemId").val(),r!=0){if(confirm("You are about to Delete the invoice item. Are you sure?")){for(i=[],n=0;n<this.SplitedInvoiceItemList.length;n++)this.SplitedInvoiceItemList[n].invoiceItemId==t.parents(".SplInvoiceItemRow").find(".hf_selectedInvoiceItemId").val()&&i.push(n);for(n=i.length-1;n>=0;n--)this.SplitedInvoiceItemList.splice(i[n],1);t.parents(".SplInvoiceItemRow").remove()}}else confirm("You are about to Delete the invoice item. Are you sure?")&&t.parents(".SplInvoiceItemRow").remove()});n.find(".btn_item_DiscType").change(function(){n.find(".btn_item_DiscType").val()=="%"&&Number(n.find(".txt_addldiscount").val())>100&&n.find(".txt_addldiscount").val("100");n.find(".btn_item_DiscType option:selected").text().trim()=="Val"?(n.find("#hf_ItemDiscountGroupId").val(0),n.find("#hf_ItemDiscountGroupName").val(""),n.find(".txt_addldiscount").prop("disabled",!1)):n.find(".btn_item_DiscType option:selected").text().trim()=="%"&&(n.find("#hf_ItemDiscountGroupId").val(0),n.find("#hf_ItemDiscountGroupName").val(""),n.find(".txt_addldiscount").prop("disabled",!1))})}Load(n){var t="",i=[],f=n.find(".select_"+t+""),e=n.find(".hf_"+t+"_Id"),r,u;i=[0];$(".hf_"+t+"_Id").each(function(){i.push($(this).val())});r="Purchase";u=$("#ddl_ShipToAddressId").val();($("#hfInv_Invoicetype").val()=="Sales"||$("#hfInv_Invoicetype").val()=="PurchaseReturn"||$("#hfInv_Invoicetype").val()=="CreditNote")&&(r="Sales",u=$("#ddl_ShipFromAddressId").val());t=="MRP"?$("#hf_FormAppTitle").val()=="Sales Return"||$("#hf_FormAppTitle").val()=="Purchase Return":t=="BatchNo"||t=="SerialNo";f=n.find(".select_"+t+"");e=n.find(".hf_"+t+"_Id")}SaveItem(n){var e=!1,o=!1,s=!1,i,u,t,f;if(0)return MessageHelper.Instance().showError(" Mandatory fields are missing ","bizgaze_CreateBatchErrorMessages"),!1;$(".SplInvoiceItemRow").each(function(){$(this).find(".Quantity").val()==0&&(e=!0)});$(".SplInvoiceItemRow").each(function(){$(this).find(".Price ").val()==0&&(s=!0)});var v=1,y=!1,e=!0,s=!0,o=!0;if(($("#hfInv_Invoicetype").val()=="Sales"||$("#hfInv_Invoicetype").val()=="PurchaseReturn")&&$(".SplInvoiceItemRow").each(function(){(v==1||y==!0)&&Number($(this).find(".Quantity").val())>Number($(this).find(".spn_Avail").text())&&(o=!0)}),e==!0)return MessageHelper.Instance().showError("Item quantity should not be zero.","bizgaze_CreateBatchErrorMessages"),!1;if(s==!0)return MessageHelper.Instance().showError("Unit Price should not be zero.","bizgaze_CreateBatchErrorMessages"),!1;if(o==!0)return MessageHelper.Instance().showError("Available Quantity is less for an item","bizgaze_CreateBatchErrorMessages"),!1;for(i=[],t=0;t<this.SplitedInvoiceItemList.length;t++)this.SplitedInvoiceItemList[t].itemId==$("#hf_ItemId").val()&&(i.push(t),u=this.DcItemIds.indexOf(this.SplitedInvoiceItemList[t].dcItemId),u>-1&&this.DcItemIds.splice(u,1));for(t=i.length-1;t>=0;t--)this.SplitedInvoiceItemList.splice(i[t],1);var h=0,r=0,c=0,l=!1,p=n.find(".hfProdTax").val(),w=n.find(".txtProdTax").val(),b=n.find(".hf_Account").val(),k=n.find(".txt_AccountName").val(),a=this;$(".SplInvoiceItemRow").each(function(){var t=$(this),v=0,y=0,u=0,f="",i="MRP",e,o,d;if(i=="MRP"?(u=Number(t.find(".hf_MRP_Id").val()),f=t.find(".select_"+i+" option[value="+u+"]").text()):i=="BatchNo"?(v=Number(t.find(".select_"+i+"").val()),u=Number(t.find(".hf_MrpId").val()),f=t.find(".select_"+i+" option[value ="+v+"]").text()):i=="SerialNo"&&(y=Number(t.find(".select_"+i+"").val()),u=Number(t.find(".hf_MrpId").val()),f=t.find(".select_"+i+" option[value="+y+"]").text()),t.find("#hf_"+i+"_Id").val()!=""&&t.find("#hf_"+i+"_Id").val()!=0){l=!0;e=0;o=0;(t.find(".btn_item_DiscType option:selected").text().trim()=="Val"||t.find(".btnOrder_DiscType option:selected").text().trim()=="Mul")&&t.find(".txt_addldiscount").val()!=""&&t.find(".txt_addldiscount").val()!=undefined?e=Number(t.find(".txt_addldiscount").val()):t.find(".btn_item_DiscType option:selected").text().trim()=="%"&&t.find(".txt_addldiscount").val()!=""&&t.find(".txt_addldiscount").val()!=undefined&&(o=Number(t.find(".txt_addldiscount").val()));d=t.find(".btnOrder_DiscType option:selected").text().trim();a.SplitedInvoiceItemList.push({invoiceItemId:t.find(".hf_selectedInvoiceItemId").val(),orderItemId:t.find(".hf_orderItemId").val(),itemId:t.find(".hf_selectedItemId").val(),taxGroupId:p,taxGroupName:w,description:t.find("#txt_Item_Description").val(),priceListId:t.find(".hf_PriceList").val(),unitPrice:t.find(".Price").val(),addlDiscountValue:e,addlDiscountPercent:o,IsTaxInclusive:$("#hfId_IsTaxInclusive").val(),accountId:b,accountName:k,Adjustment:t.find(".hf_RowTotalAdjustment").val(),TotalAmount:t.find(".hf_RowTotal").val(),quantity:t.find(".Quantity").val(),exciseAmount:t.find(".exciseAmount").val(),refNo:t.find(".hf_refNo").val(),DiscountGroupId:t.find("#hf_ItemDiscountGroupId").val(),RefInvoiceItemId:t.find(".hf_refInvoiceItemId").val(),MrpId:u,dcItemId:t.find(".hf_dcItemId").val(),BatchId:v,SerialId:y,ExchangeItem:t.find(".hf_IsExchangeItem").val(),taxAdjustment:t.find(".hf_ItemTaxAdjsutmentVal").val(),assesableAdjustment:t.find(".hf_ItemAssesableAdjustmentVal").val(),DiscountGroupName:t.find(".hf_ItemDiscountGroupName").val(),DiscountedAmount:t.find(".hf_DiscountedAmount").val(),TaxPercent:n.find(".hfProdTaxPercent").val(),Name:f,DiscType:d,maxQty:t.find(".hf_maxQty").val()});h+=Number(t.find(".Quantity").val());var s=0,g=Number(t.find(".Quantity").val()),nt=Number(t.find(".Price").val()),tt=Number(t.find(".exciseAmount").val()),it=Number(t.find(".hf_ItemAssesableAdjustmentVal").val()),rt=Number(t.find(".hf_RowTotalAdjustment").val());s=(g*nt+it+rt-tt)*Number(o)/100+Number(g)*Number(e);s=Number(s);c+=s;r+=$("#hfInv_Invoicetype").val()=="Purchase"||$("#hfInv_Invoicetype").val()=="PurchaseReturn"||$("#hfInv_Invoicetype").val()=="DebitNote"?Number(t.find(".txt_RowTotalwithAdjustment").val()):Number(t.find(".TotalPrice").text());a.DcItemIds.push(Number(t.find(".hf_dcItemId").val()))}});f="MRP";(l=!0)?n.find(".spn_InvoiceItem").text("View "+f):n.find(".spn_InvoiceItem").text("Select "+f);n.find(".prodQuantity").val();n.find(".prodQuantity").val(h);n.find("#inv_txtdiscount").val();n.find("#inv_txtdiscount").val(c);$("#hfInv_Invoicetype").val()=="Purchase"||$("#hfInv_Invoicetype").val()=="PurchaseReturn"||$("#hfInv_Invoicetype").val()=="DebitNote"?(n.find(".txtRowTotalwithAdjustment").val(),n.find(".txtRowTotalwithAdjustment").val(r)):(n.find(".prodTotalPrice").text(""),n.find(".prodTotalPrice").text(r));this.navigationHelper.closePopUp()}static Instance(){return new i}}i.element="";t.MRPDetails=i})(i=t.Controls||(t.Controls={}))})(t=n.Forms||(n.Forms={}))})(Unibase||(Unibase={}));