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.

invoiceamount.component.min.js 7.9KB

1
  1. var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{init(n,t){var r=i.Instance();r.loadControlSettings(t.ControlJsonText,t.FormPropertyId);r.loadPropertySettings(t.PropertySettings,t.FormPropertyId)}loadControl(n){var i;$("#"+n).html("<div class='col-xs-2 text-right hidden'><strong><span id='grosstotal' class='text-primary'>0.00<\/span><\/strong><\/div><div class='row form-group'><div class='col-sm-6'><span class='pull-left'>Total Qty<\/span><span class='pull-right' id='totalinvoiceqty'>0.00<\/span><\/div><div class='col-sm-6'><span class='pull-left'>Sub Total<\/span><span class='pull-right' id='subtotal'>0.00<\/span><\/div><\/div> <div class='row form-group'><div class='col-sm-6'> <span class='pull-left'> Discount On Items<\/span><span class='pull-right' id='totalItemDiscount'>0.00<\/span><\/div> <div class='col-sm-6'> <span class='pull-left'>Tax<\/span><span class='pull-right' id='totalTax'>0.00<\/span><\/div><\/div> <div class='row col-sm-12 form-group hidden'><div class='col-sm-6'><\/div><div class='col-sm-4 pull-left col-xs-6'>TDS<\/div><div class='col-sm-2 col-xs-6'><span class='pull-right'>0.00<\/span><\/div><\/div> <div class=''><div class='netdiscount-row hidden'><\/div><div class='expense-row hidden'><\/div><\/div> <div class='row py-2'><div class='col-sm-6'><a id='addNetDiscount' class='btn btn-outline-primary mb-2' title='Add Discount'><span class='px-1'><i class='la la-plus'><\/i><\/span><span>Add Coupon<\/span><\/a><span> <\/span><a id='addExpense' class='btn btn-outline-primary mb-2' title='Add Expense'><span class='px-1'><i class='la la-plus'><\/i><\/span><span>Add Expense<\/span><\/a><\/div><div class='col-sm-4 col-xs-6 hidden'>Expenses<\/div><div class='col-sm-2 col-xs-6 hidden'><span class='pull-right'>0.00<\/span><\/div><\/div> <div class='row'><div class='col-sm-3 div_IsAutoAdjustment mt-30'><input type='checkbox' id='chk_AutoAdjustment' class='css-checkbox'><label for='chk_AutoAdjustment' class='css-label text-sm pa-10'>Adjustment<\/label><\/div><div class='col-sm-6 col-lg-5 div_AdjustmentAccount '><div class='floating-label-form-group-with-value'><label id='lbl_AdjustmentAccountId' for='lbl_AdjustmentAccountId'>Account Name<span class='span_AdjustmentAccountName text-danger'> *<\/span><\/label><div class='input-group'><select id='txt_AdjustmentAccountName' class='form-control text-control select2-hidden-accessible txt_Account' style='width: 100%;' data-placeholder='Select' data-label='Account Name' placeholder='Select'><option value='0'><\/option><\/select><input type='hidden' id='hf_AdjustmentAccountId' value='0'><\/div><\/div><\/div><div class='col-sm-3 col-lg-4 mt-20'><div class='col-sm-8 floating-label-form-group input-group pull-left'><input type='text' placeholder='0.00' id='txt_Adjustment' class='form-control floating-label-control text-center text-right' value='0.00' /><\/div><div class='pt-10 pull-right'><span class=' mt-10' id='span_Adjustment'>0.00<\/span><\/div><\/div><\/div><div class='row col-sm-12 divWalletAmountContainer hidden'><a id='txt_Wallet' title='Wallet Details' class='default pull-left' href='' data-toggle='modal' data-original-title='Wallet'><span class='pull-left' style='text-decoration:underline;color:cornflowerblue' id='btn_Wallet'>Wallet- <strong><small id='WalletAmount'><\/small><\/strong><\/span><\/a><\/div> <div class='col-sm-12 WalletItems mt-10 collapse' style='border: 1px;border-style:groove;'><div id='tbl_WalletItems' class='col-sm-12'><\/div><\/div>");$("#txt_Adjustment").prop("disabled",!1);$("#txt_Adjustment").keypress(function(n){n.which>47&&n.which<58||n.which==46||n.which==8||n.which==45||n.preventDefault()}).on("paste",function(n){n.preventDefault()});$("#txt_Adjustment").blur(function(){$("#chk_AutoAdjustment").prop("checked")==!1&&($(".hdn_adjustment").val($("#txt_Adjustment").val()),Number($("#txt_Adjustment").val())!=0?$(".span_AdjustmentAccountName").removeClass("hidden"):$(".span_AdjustmentAccountName").addClass("hidden"),t.InvoiceItem.Instance().update_total(),t.InvoiceItem.Instance().TotalAdjustment())});i=this;i.loadAccounts();$("#chk_AutoAdjustment").prop("checked",!0);$(".hdn_autoadjustment").val("true");$("#txt_Adjustment").prop("disabled",!0);$("#chk_AutoAdjustment").change(function(){$("#chk_AutoAdjustment").is(":checked")?($(".span_AdjustmentAccountName").removeClass("hidden"),$("#txt_Adjustment").prop("disabled",!0),t.InvoiceItem.Instance().update_total(),t.InvoiceItem.Instance().TotalAdjustment(),$(".hdn_autoadjustment").val("true")):($("#txt_Adjustment").val(0),$("#txt_Adjustment").blur(),$(".hdn_adjustment").val(0),$(".span_AdjustmentAccountName").addClass("hidden"),$("#txt_Adjustment").prop("disabled",!1),$(".hdn_autoadjustment").val("false"))});$("#addNetDiscount").off().click(function(){let n=$(".hfAutoCompleteId_lobid").val();if(n==undefined||n==""||n=="0")return MessageHelper.Instance().showError("Please Select LoB",$("#form-container-"+$("#hf_FormId").val()).find(".bizgaze_FormErrorMessages").attr("id")),!1;t.InvoiceItem.Instance().addNetDiscountRow();$(".netdiscount-row:last").find(".netdiscount-name").find("input:text").focus()});$("#addExpense").off().click(function(){let n=$(".hfAutoCompleteId_lobid").val();if(n==undefined||n==""||n=="0")return MessageHelper.Instance().showError("Please Select LoB",$("#form-container-"+$("#hf_FormId").val()).find(".bizgaze_FormErrorMessages").attr("id")),!1;t.InvoiceItem.Instance().addExpenseRow(null,"","",!0);$(".expense-row:last").find(".expense-name").find("input:text").focus()});($(".hdn_invoicetypeid").val()=="3"||$(".hdn_invoicetypeid").val()=="4"||$(".hdn_invoicetypeid").val()=="6"||$(".hdn_invoicetypeid").val()=="7")&&$("#addNetDiscount").addClass("hidden")}loadControlSettings(){return null}loadPropertySettings(n,t){var i,r;if(n!=null)for(i=0;i<n.length;i++)r=n[i],r.ControlPropertyName=="MaxLength"&&$("#txt_"+t).attr("MaxLength",r.ControlPropertyValue)}bindEditFormDetails(){throw new Error("Method not implemented.");}loadAccounts(){var n=this,t=_appsettings.server_url()+"/apis/v4/bizgaze/transact/ledgers/ledgerautocomplete";AutoCompleteHelper.getHelper().Create("#txt_AdjustmentAccountName","#hf_AdjustmentAccountId",t,null);$("#txt_AdjustmentAccountName").on("select2:select",function(){n.LedgerAccountChange()})}LedgerAccountChange(){var t=this,i=_appsettings.server_url()+"/apis/v4/bizgaze/transact/ledgers/ledgerautocomplete";AutoCompleteHelper.getHelper().Create("#txt_AdjustmentAccountName","#hf_AdjustmentAccountId",i,function(i){var o,s;var r=0,u="",f="",e="";r=Number(i.id);u=i.text;f="#txt_AdjustmentAccountName";e="#hf_AdjustmentAccountId";r==0&&(u="Select Account");(r==1||r==-1)&&(u="Create New");u=="Create New"&&($("#txt_AdjustmentAccountName").val(null).trigger("change"),o="Bizgaze_Extension_Transact_Ledgers_App_Ledgers_CreateForm",s="Bizgaze_Extension_Transact_Ledgers_AppConfiguration_CreateLedgers",Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(o).then(function(i){var r={controlid:f,hiddenid:e},u={CallBack:function(t,i){n.Apps.Transact.Managers.LedgerManager.Instance().getLedgerById(t).then(function(n){var t=new Option(n.result.LedgerName,n.result.LedgerId,!0);$(i.controlid+" option").remove();$(i.controlid).append(t).trigger("change");$(i.hiddenid).val(n.result.LedgerId)})},Parameters:r},o={FormId:i.result.FormId,AppConfigurationId:0,Pk_Value:0,PortletWidgetId:0,OnSuccess:u,OnFail:null,OnLoad:null};t.fileCacheHelper.loadJsFile("apps/transact/managers/ledgers/ledgermanager.js",function(){t.fileCacheHelper.loadJsFile("platform/forms/components/formviewer/formviewer.js",function(){Unibase.Platform.Forms.Components.FormViewer.instance.init(o);setTimeout(function(){$("#btn_CloseForm_"+i.result.FormId).click(function(){$("#txt_AdjustmentAccountName").val(null).trigger("change")})},1e3)})})}))})}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.InvoiceAmount=i})(i=t.Controls||(t.Controls={}))})(i=t.Transact||(t.Transact={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));