/// <summary><see cref="ApplicationControl"/>によって、メニューが利用可能か判別するメソッド</summary> public bool IsAvailable(ApplicationControl app) => (app.UseForeignCurrency == 0 || app.UseForeignCurrency == 1 && !IsForeignCurrencyExcluded) && (IsStandard || app.UseReceiptSection == 1 && IsReceiptSection || app.UseForeignCurrency == 1 && IsForeignCurrencyOnly || app.UseScheduledPayment == 1 && IsScheduledPaymentOnly || app.UseAuthorization == 1 && IsAuthorizationOnly || app.UseDistribution == 1 && IsDistribution || app.UsePublishInvoice == 1 && IsPublishInvoice || app.UseHatarakuDBWebApi == 1 && IsHatarakuDBWebApi || app.UsePCADXWebApi == 1 && IsPcaDXWebApi || app.UseReminder == 1 && IsReminder || app.UseAccountTransfer == 1 && IsAccountTransfer || app.UseMFWebApi == 1 && IsMFWebApi || app.UseClosing == 1 && IsClosing );
public DataExpression(ApplicationControl appCtrl) { if (appCtrl != null) { AccountTitleCodeFormatString = appCtrl.AccountTitleCodeType == 1 ? "A9" : "9"; AccountTitleCodeLength = appCtrl.AccountTitleCodeLength; switch (appCtrl.CustomerCodeType) { case 0: CustomerCodeFormatString = "9"; break; case 1: CustomerCodeFormatString = "A9-_"; break; case 2: CustomerCodeFormatString = "KA9-_"; break; } CustomerCodeLength = appCtrl.CustomerCodeLength; MinCustomerFee = appCtrl.UseForeignCurrency == 1 ? 0M : 1M; MaxCustomerFee = appCtrl.UseForeignCurrency == 1 ? 9999999.99999M : 9999999M; DepartmentCodeFormatString = appCtrl.DepartmentCodeType == 1 ? "A9" : "9"; DepartmentCodeLength = appCtrl.DepartmentCodeLength; IgnoreKanaLength = 140; LoginUserCodeFormatString = appCtrl.LoginUserCodeType == 1 ? "A9" : "9"; LoginUserCodeLength = appCtrl.LoginUserCodeLength; SectionCodeFormatString = appCtrl.SectionCodeType == 1 ? "A9" : "9"; SectionCodeLength = appCtrl.SectionCodeLength; StaffCodeFormatString = appCtrl.StaffCodeType == 1 ? "A9" : "9"; StaffCodeLength = appCtrl.StaffCodeLength; UseDistribution = appCtrl.UseDistribution; UseForeignCurrency = appCtrl.UseForeignCurrency; UseReceiptSection = appCtrl.UseReceiptSection; UseDiscount = appCtrl.UseDiscount; GeneralSettingValue = appCtrl.GeneralSettingValue; } }
/// <summary>入金フリーインポーターで利用可能な field かどうか</summary> /// <param name="app"></param> public bool IsUsableForReceipt(ApplicationControl app) => app.UseReceiptSection == 1 && IsSectionFieldForReceipt || app.UseForeignCurrency == 1 && IsCurrencyFieldForReceipt || !(IsSectionFieldForReceipt || IsCurrencyFieldForReceipt);