{"version":3,"sources":["../node_modules/@linways/table-to-excel/dist sync","redux/constants/docs.js","redux/reducers/docs.js","redux/constants/companies.js","utils/helpers/helpers.ts","redux/reducers/companies.js","redux/constants/docCreate.js","redux/reducers/docCreate.js","redux/reducers/loadingReducer.js","redux/constants/balance.js","redux/reducers/balance.js","redux/constants/docsTable.js","redux/reducers/docsTable.js","redux/constants/contragent.js","redux/reducers/contragent.js","redux/constants/plans.js","redux/reducers/plans.js","utils/constants/Auth.ts","redux/slices/authSlice.ts","redux/slices/uiSlice.ts","redux/slices/index.ts","redux/store.ts","components/Loader/Loader.tsx","components/Auth/KeySelect.js","utils/constants/User.ts","utils/api/CommonApi.ts","utils/constants/Url.ts","utils/helpers/network.ts","utils/EImzo/e-imzo.ts","utils/EImzo/e-imzo-client.js","utils/helpers/toast.ts","utils/api/EImzo.ts","utils/api/Auth.ts","utils/styles/makeStyles.ts","utils/hooks/index.ts","components/Auth/PublicOffer.js","utils/constants/PublicOffer.ts","utils/hooks/Auth/useAuth.ts","assets/images/logo.svg","components/Auth/Auth.tsx","utils/constants/docs/factura.ts","assets/images/icon/Vector.png","assets/images/icon/icon1.png","redux/actions/docs.js","redux/actions/companies.js","redux/actions/docCreate.js","redux/actions/balance.js","redux/actions/isLoadingFire.js","redux/actions/docsTable.js","redux/actions/contragent.js","redux/actions/settings.js","redux/constants/settings.js","redux/actions/plans.js","utils/api/Payment.ts","utils/api/Document.ts","utils/api/Company.ts","redux/thunks/thunks.ts","components/common/StatusBlock.tsx","components/Auth/CompanyPicker.js","components/common/UtilComponents.js","utils/hoc/withModal.tsx","components/Settings/Users/AddUsers.tsx","components/common/PageTitle.tsx","redux/thunks/companyThunks.ts","components/Settings/Users/UserCardsList.tsx","utils/api/Telegram.ts","components/Settings/TelegramAPI/AddId.js","assets/images/icons/link.png","assets/images/icons/desktop_phone.png","assets/images/icons/touch.png","assets/images/icons/copy.png","components/Settings/TelegramAPI/TelegramSettings.js","components/Settings/Plans/Plans.js","utils/constants/docs/excel.ts","components/Settings/RecentCods/Marks.tsx","components/common/BaseSelect.tsx","utils/hooks/useFetching.ts","components/Settings/RecentCods/Searchers.tsx","components/Settings/RecentCods/RecentCods.tsx","components/Settings/Privileges/Privileges.js","components/Settings/Token/Token.tsx","components/Settings/Settings.tsx","assets/files/templateEnvoice.xlsx","assets/files/templateAct.xlsx","components/CreateDoc/factura/constants.ts","components/ImportDoc/ImportFromXLS.tsx","assets/images/icons/upload.png","assets/images/ham.png","assets/images/cog.png","components/ProductList/options.ts","components/ProductList/ListItem.tsx","components/ProductList/ProductList.tsx","utils/EImzo/SrvCon.js","components/CreateDoc/factura/FacturaContext.ts","utils/hooks/Factura/useFacturaContext.tsx","components/CreateDoc/factura/SingleProductRow/SingleProductRow.tsx","components/CreateDoc/factura/ProductList.tsx","components/CreateDoc/factura/Factura/selectTypes.ts","components/CreateDoc/factura/Factura/IncomeTypeSelect.tsx","components/CreateDoc/factura/Factura/ForImport.tsx","components/CreateDoc/factura/Factura/PrevInvoiceData.tsx","utils/hooks/useRole.tsx","components/CreateDoc/factura/Factura/TinAlertModal.tsx","utils/helpers/document/document.ts","redux/thunks/documentThunks.ts","utils/helpers/document/factura.ts","components/CreateDoc/factura/Types.tsx","components/CreateDoc/factura/OneSidedSelect.tsx","utils/hooks/useDebounceFn.ts","components/CreateDoc/factura/FacturaInfo.tsx","components/CreateDoc/factura/Factura/Factura.tsx","components/CreateDoc/CompanyInfo.tsx","components/CreateDoc/empowerment/contants.ts","components/CreateDoc/empowerment/Products/SingleProductRow.tsx","components/CreateDoc/empowerment/Products/ProductList.tsx","components/CreateDoc/empowerment/Products/index.tsx","components/CreateDoc/empowerment/Contract/index.tsx","components/CreateDoc/empowerment/Empowerment.tsx","components/CreateDoc/act/SingleProductRow.js","components/CreateDoc/act/ProductList.js","components/CreateDoc/act/Act.tsx","components/CreateDoc/pdf/pdf.js","assets/files/images/full-screen.png","assets/files/images/normal-screen.png","components/CreateDoc/Preview.js","components/CreateDoc/custom/Custom.tsx","components/CreateDoc/verificationAct/CompanyInfo.tsx","components/CreateDoc/verificationAct/Info.tsx","components/CreateDoc/verificationAct/constants.ts","components/CreateDoc/verificationAct/ActInput.tsx","components/CreateDoc/verificationAct/Contracts/ContractItem.tsx","components/CreateDoc/verificationAct/Contracts/Contract.tsx","components/CreateDoc/verificationAct/Contracts/index.tsx","components/CreateDoc/verificationAct/ActDescription.tsx","components/CreateDoc/verificationAct/VerificationAct.tsx","components/CreateDoc/contract/CompanyInfo.tsx","components/CreateDoc/contract/constant.ts","components/CreateDoc/contract/Info.tsx","components/CreateDoc/contract/Product.tsx","components/CreateDoc/contract/ProductList.tsx","components/CreateDoc/contract/Contract.tsx","components/CreateDoc/wayBill/CompanyInfo.js","components/CreateDoc/wayBill/constants.js","components/CreateDoc/wayBill/Info.js","components/CreateDoc/wayBill/WayBill.js","components/CreateDoc/wayBillNew/mobx/store.tsx","components/CreateDoc/wayBillNew/RoadwayForm1.tsx","components/CreateDoc/wayBillNew/RoadwayForm2.tsx","components/CreateDoc/wayBillNew/RoadwayOtherCarOwners.tsx","components/CreateDoc/wayBillNew/RoadwayCarriages.tsx","components/CreateDoc/wayBillNew/ProductGroupForm1.tsx","components/CreateDoc/wayBillNew/ProductGroupForm2.tsx","components/CreateDoc/wayBillNew/UnloadingEmpowerment.tsx","components/CreateDoc/wayBillNew/ProductGroupInfo.tsx","components/CreateDoc/wayBillNew/ProductGroupTable.tsx","components/CreateDoc/wayBillNew/ProductGroupItem.tsx","components/CreateDoc/wayBillNew/ProductGroups.tsx","components/CreateDoc/wayBillNew/RoadwayForm3.tsx","components/CreateDoc/wayBillNew/Roadway.tsx","components/CreateDoc/wayBillNew/Info.tsx","components/CreateDoc/wayBillNew/Form1.tsx","components/CreateDoc/wayBillNew/Form2.tsx","components/CreateDoc/wayBillNew/ResponsiblePerson.tsx","components/CreateDoc/wayBillNew/WayBillNew.tsx","components/CreateDoc/CretateDoc.js","components/MainView/Modals/CreateDocModal/CreateDocModal.tsx","components/MainView/Header/Header.tsx","components/MainView/SideBar/Balance.tsx","assets/images/icons/wallet.png","assets/images/icons/docPage.png","assets/images/icons/refresh.png","assets/Icons/Filter.js","components/MainView/SideBar/DatePickerLavina.tsx","components/MainView/KeySelect.js","components/MainView/SideBar/SummType.tsx","components/MainView/SideBar/Filter.tsx","utils/constants/Common.ts","components/MainView/SideBar/index.tsx","components/MainView/status.js","components/MainView/TableView/Table.js","components/MainView/SetPage.js","components/MainView/ExcelExport.js","components/MainView/TableView/DocumentView.js","assets/files/images/copy-link.png","components/MainView/TableView/TableSettings.tsx","components/MainView/TableView/TypeButtons.tsx","components/MainView/TableView/PrintDocumentView.tsx","components/MainView/TableView/TableView.tsx","components/MainView/PaymentModal.js","components/MainView/PromoModal.js","components/MainView/FacturaMandatoryRegistration.js","components/MainView/MainView.tsx","pages/ProtectedView/ProtectedView.tsx","components/contragent/Header.js","components/contragent/Document.js","components/contragent/ErrorPage.js","components/contragent/Auth.tsx","pages/SignDoc/AppContragent.js","components/Routes/Routes.tsx","pages/SignDoc/SignDoc.tsx","utils/hooks/Shared/useLoading.ts","pages/Root.tsx","index.tsx"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","module","exports","id","FETCH_DOCS_SUCCESS","FETCH_DOCS_FOR_EXPORT_SUCCESS","SET_DOCS_TO_PRINT","initialState","docs","docsToExport","pageCount","docsToPrint","state","type","payload","data","FETCH_COMPANIES_SUCCESS","REQUEST_COMPANY_INFO_SET_PENDING","REQUEST_COMPANY_INFO_SET_SUCCESS","REQUEST_COMPANY_INFO_SET_ERROR","SET_COMPANY_SET_AUTO","saveValue","key","value","window","sessionStorage","setItem","JSON","stringify","setValue","getValue","parse","getItem","setObjectState","setState","download","filename","text","element","document","createElement","setAttribute","encodeURIComponent","style","display","body","appendChild","click","removeChild","dateF","date","t","includes","arr","split","dateFormatter","getFullYear","String","getMonth","padStart","getDate","toast","toaster","message","undefined","roundFloat","exp","Math","isNaN","NaN","toString","deleteProduct","products","product","setProducts","filter","item","OrdNo","map","idx","toCurrency","num","toLocaleString","isEmptyObject","obj","prop","hasOwnProperty","getParams","params","Object","param","deepClone","structuredClone","sleep","ms","Promise","setTimeout","encode","Base64","numberToString","number","getFactoredInfo","info","vatRegCode","taxPayerType","taxGap","status","isPhis","Tin","tin","Name","name","shortName","Account","account","BankId","mfo","Address","address","Mobile","WorkPhone","Oked","oked","DistrictId","ns10Code","ns11Code","Director","director","DirectorTin","directorTin","Accountant","accountant","VatRegCode","VatRegStatus","TaxGap","Pinfl","personalNum","directorPinfl","IsPhis","handleJsonCorrection","replace","getFormattedDate","moment","format","arrayToString","array","Boolean","join","getCorrectQueries","queries","values","query","getCasedObject","oldFormat","desiredFormat","newObj","correctName","correctKey","toLocaleLowerCase","objectValue","Array","isArray","clearSlash","url","providerFromSession","companies","setCompanyCompleted","providerIsSet","providers","setAuto","pending","SET_DOC_IS_ADDITIONAL","SET_DOC_CREATED_IS_PREVIEWED","CHANGED_DOC_CREATE_FORM","CLOSED_DOC_CREATE_FORM","REQUESTED_DOC_CREATE_BY_COPY","REQUESTED_DOC_CREATE_BY_COPY_FINISHED","REQUEST_DOC_BEING_COPIED_INFO_SUCCESS","doc","formChanged","docBeingCopiedId","docBeingCopiedData","docIsBeingCopied","docIsAdditional","docIsAdditionalType","docIsPreviewed","docPreviewedData","docCreate","loadingReducer","action","matches","exec","requestName","requestState","FETCH_BALANCE_SUCCESS","balance","money","tarif","package","CHANGE_COLUMN_VISIBILITY","CHANGE_PER_PAGE_LIMIT","CHANGE_SORT_BY_COLUMN","SET_NEED_TO_RELOAD","CHANGE_SORT_DIRECTION","columnsToShow","docType","show","title","docDate","updateDate","docNo","contractNo","contractDate","partnerTin","summa","limit","sortBy","isSortDireactionDesc","needToReload","docsTable","FETCH_DOC_SUCCESS","FETCH_DOC_ERROR","contragent","FETCH_CURRENT_PLAN_SUCCESS","FETCH_ALL_PLANS_SUCCESS","REQUEST_CURRENT_PLAN_CHANGE_SUCCESS","plans","currentPlan","initialProfile","pinfl","profile","auth","authSlice","createSlice","reducers","setProfile","setAuth","authReducer","reducer","authActions","actions","uiSlice","isLoading","setLoading","uiActions","ui","persistConfig","storage","stateReconciler","autoMergeLevel2","whitelist","middleware","rootReducer","combineReducers","persistedReducer","persistReducer","store","configureStore","devTools","process","getDefaultMiddleware","serializableCheck","ignoredActions","FLUSH","REHYDRATE","PAUSE","PERSIST","PURGE","REGISTER","concat","persistor","persistStore","animation","keyframes","Spinner","styled","div","SpinnerElipse","SpinnerShadow","Loader","useEffect","overflowY","KeySelect","selectedKey","onClick","vo","CN","selectStle","KeyOptions","options","CardStyleСhoice","i","cardStyle","styleParagra1","styleParagra","fontWeight","color","TIN","O","marginBottom","width","minHeight","borderRadius","cursor","padding","fontSize","justifyContent","margin","border","alignItems","maxWidth","background","height","overflow","zIndex","position","top","username","password","this","token","CommonApi","a","axios","get","response","ip","fetchData","url1c","urlGo","cors","isDev","configuredAxios","method","Url","host","headers","Authorization","User","credentials","Token","error","dispatch","errorMessage","ErrorMessage","console","dir","errorDescription","ErrorDescription","postData","postDataResponse","removeData","CAPIWS","location","protocol","toLowerCase","funcDef","callback","WebSocket","socket","URL","handleSocket","onopen","send","domainAndKey","o","arguments","onerror","onmessage","close","Date","prototype","yyyymmdd","yyyy","mm","dd","ddmmyyyy","splitKeep","splitter","ahead","self","result","lastIndex","RegExp","m","push","index","substChar","subst","length","getSubst","nextIndex","part","substring","add","EIMZOClient","NEW_API","API_KEYS","checkVersion","success","fail","version","event","major","minor","installedVersion","parseInt","reason","installApiKeys","apikey","listAllUserKeys","itemIdGen","itemUiGen","items","errors","_findCertKeys2","firstItmId","_findPfxs2","firstItmId2","_findTokens2","firstItmId3","r","firstId","_findCertKeys","_findPfxs","loadKey","itemObject","callFunction","plugin","disk","path","serialNumber","keyId","alias","cardUID","changeKeyPassword","createPkcs7","timestamper","pkcs7","pkcs7_64","sn","signer_serial_number","signature_hex","tst","pkcs7tst","_getX500Val","s","f","res","n","search","slice","_findCertKeyCertificates","allDisks","diskIndex","rec","certificates","el","subjectName","validFrom","validTo","issuerName","publicKeyAlgName","T","itmkey","itm","disks","_findPfxCertificates","x500name_ex","toUpperCase","UID","PINFL","itmkey0","tokens","statusInfo","ownerName","notify","config","notifyError","appendPkcs7Attached","EImzo","isAttached","newData","log","reject","fetchTimestamp","signature","hex","setSuccess","setKeys","installAllKeys","handleError","keysArray","toastId","AuthApi","getToken","encrypt","loginResponse","sign","makeStyles","createMakeStyles","useTheme","useSelector","useReduxSelector","useDispatch","useReduxDispatch","PublicOffer","props","classes","useStyles","useState","accept","setAccept","className","container","content","checked","onChange","disabled","acceptPublicOffer","then","catch","marginTop","resize","textAlign","paddingLeft","paddingRight","useAuth","FacturaTypes","FacturaSingleTypes","VatRegStatuses","SigninTitle","alt","src","Logo","paddingTop","flexDirection","transition","containerSignin","StyledCard","Card","maxHeight","Title","h1","fontFamily","StyledButton","Button","AuthImage","img","marginRight","WarningImage","OptionsWrapper","WarningText","p","OptionsBackground","bottom","left","right","WarningWrapper","Auth","useRouteMatch","cx","isSignDoc","setSelectedKey","showOptions","setShowOptions","publicOffer","setPublicOffer","triedAuth","setTriedAuth","handleAuthClick","authorize","handleLoginAuto","login","user","find","CompanyName","CompanyTin","loadKeys","fetchDocsPending","fetchDocsSuccess","fetchDocsError","fetchDocsForExportPending","fetchDocsForExportSuccess","fetchDocsForExportError","setDocsToPrint","fetchCompaniesPending","fetchCompaniesSuccess","fetchCompaniesError","requestCompanyInfoSetPending","requestCompanyInfoSetSuccess","requestCompanyInfoSetError","setCompanyAuto","changedDocCreateForm","isChanged","closedDocCreateForm","requestDocCreateByCopy","requestDocCreateByCopyFinished","requestDocBeingCopiedInfoPending","requestDocBeingCopiedInfoSuccess","requestDocBeingCopiedInfoError","setDocIsAdditional","setDocCreatedIsPreviewed","fetchBalancePending","fetchBalanceSuccess","fetchBalanceError","xxxIsLoadingPending","xxxIsLoadingSuccess","xxxIsLoadingError","dispatchIsLoadingPending","dispatchIsLoadingSuccess","dataNeededToReload","contragentActions","setNeedToReload","dispatchIsLoadingError","changeColumnVisibility","column","changePerPageLimit","changeSortDirection","direction","changeSortByColumn","val","fetchDocPending","fetchDocSuccess","fetchDocError","requestToChangeOptionPending","requestToChangeOptionSuccess","requestToChangeOptionError","fetchAllPlansPending","fetchAllPlansSuccess","fetchAllPlansError","fetchCurrentPlanPending","fetchCurrentPlanSuccess","fetchCurrentPlanError","requestCurrentPlanChangePending","requestCurrentPlanChangeSuccess","newPlan","requestCurrentPlanChangeError","requestPlanResetPending","requestPlanResetSuccess","requestPlanResetError","Payment","DocumentApi","isLocal","fetchId","isRecommended","ИДДокумента","ДанныеДок","ТипДокумента","link","fetchIp","newBody","ИП","newDoc","Заметки","notes","Действие","Company","sellerTin","buyerTin","catalogCode","setting","isSelected","searchValue","page","count","byCode","fetchMarks","marks","mark","subPositionName","brandName","attributeName","mxikCode","isBudget","companyTin","searchTin","employee","fizTin","FizTin","Fio","Roles","lotId","regionId","soato","recordTotal","totalMarks","getResource","addr","fetch","ok","correcting","fetchDocs","sort","sortType","docsActions","fetchFilteredDocs","dateFrom","dateTo","endOf","docsTableActions","fetchBalance","balanceActions","fetchCompanies","companiesActions","requestCompanyInfoSet","selectCompany","getDocInfo","docCreateActions","fetchInfo","fetchAllPlans","plansActions","fetchRates","fetchCurrentPlan","fetchCurrentRate","requestCurrentPlanChange","plan","nextDate","setRate","resetPlan","resetRate","StatusBlock","statusStyle","backgroundColor","Phis","Active","Inactive","InactiveTemp","VatPayerPlus","statuses","gap","CompanyPicker","companiesReducer","handleProfileChange","company","lg","md","sm","minWidth","roles","role","LSelect","noContainer","dropdown","target","selected","elem","view","header","withModal","WrappedComponent","isOpen","ref","others","currentBinding","onClose","onSubmit","userName","setUserName","userTin","setUserTin","userRoles","setUserRoles","handleClose","handleCheck","setRoles","checkRole","toggleRole","open","toggle","size","closeAriaLabel","required","placeholder","getUserNameByUserTin","children","label","theme","Number","PageTitle","subtitle","attrs","clsx","xs","fetchTinsNameThunk","tins","settingsActions","links","all","taxpayers","names","payer","removeBindingThunk","unbindEmployee","saveBindingAccessThunk","access","bindEmployee","UserCardsList","setOpen","bindings","setBindings","update","setUpdate","setTaxpayers","setCurrentBinding","handleModalToggle","handleModalClose","handleBindingsUpdate","fetchEmployees","handleNamesAttach","handleModalSubmit","addBtn","tableWrapper","row","col","taxpayer","rowDocs","outline","pill","boxShadow","borderTop","borderBottom","TelegramApi","recieved","accepted","rejected","AddId","tgName","setTgName","tgId","setTgId","setRecieved","setAccepted","setRejected","collapseTelegramInstructions","setCollapseTelegramInstructions","currentTelegram","modalClassName","href","rel","Telegram","addUser","TelegramSettings","listID","setlistID","setCurrentTelegram","updateListId","deleteUser","fetchUsers","users","facturaXls","Plans","plansReducer","balanceReducer","tableCurrent","setTableCurrent","collapseSelectPlan","setCollapseSelectPlan","confirmPlanResetModalShow","setConfirmPlanResetModalShow","confirmPlanReset","setConfirmPlanReset","centered","docsNo","price","overLimitPrice","hidden","Marks","fetchBranches","onPageChange","onMarksLoad","handleLoad","handleMove","flex","unselectMark","BaseSelect","Select","isCreatable","SelectCreatable","ReactSelect","isAsync","AsyncSelect","separator","noOptionsMessage","onSelectCreated","isRemoveable","onRemove","isDisabled","styles","components","clearValue","onInputChange","option","optionLabel","optionValue","selectorValue","select","selectValue","setOption","isClearable","autoFocus","IndicatorSeparator","Option","uid","innerProps","innerRef","isFocused","isNew","__isNew__","newInnerProps","onMouseMove","onMouseOver","selectOption","selectOption__selected","selectOption__focused","ButtonBase","removeButton","onMouseDown","confirm","control","menuPortal","base","formatCreateLabel","inputValue","onCreateOption","menuPlacement","placement","filterOption","createFilter","ignoreAccents","React","memo","useFetching","setIsLoading","setError","fetching","Searchers","selectedMark","onMarkChanged","setMarks","setMark","handleMarkLoad","handleOptionChange","searchMarks","fetchMark","handleInputChange","selectMark","cods","setCods","setSelectedMark","setPage","handleMarkChange","handleMarksLoad","Privileges","privilege","setPrivilege","fetchSettnigs","settings","err","setSettings","copyToClipboard","str","navigator","clipboard","writeText","Settings","marksDef","ProductType","KIZ","NomUpak","IdentTransUpak","prodDef","CommittentName","CommittentTin","CommittentVatRegCode","CommittentVatRegStatus","Serial","MeasureId","BaseSumma","ProfitRate","Count","Summa","DeliverySum","VatRate","VatSum","DeliverySumWithVat","ExciseRate","ExciseSum","WithoutVat","CatalogCode","CatalogName","Barcode","LgotaId","PackageCode","PackageName","LgotaName","LgotaVatSum","LgotaType","personDef","BranchCode","BranchName","TaxgGap","facturaVatRegStatuses","facturaDef","Version","SingleSidedType","IncomeType","FacturaType","FacturaId","HasMarking","FacturaDoc","FacturaNo","FacturaDate","OldFacturaDoc","OldFacturaId","OldFacturaNo","OldFacturaDate","ContractDoc","ContractNo","ContractDate","FacturaEmpowermentDoc","AgentFacturaId","EmpowermentNo","EmpowermentDateOfIssue","AgentFio","AgentPinfl","ItemReleasedDoc","ItemReleasedFio","ItemReleasedPinfl","SellerTin","BuyerTin","LotId","Seller","Buyer","ForeignCompany","CountryId","Bank","ProductList","FacturaProductId","HasExcise","HasCommittent","HasMedical","HasVat","HideReportCommittent","Products","defaultFacturaProps","isOneSided","isAutoCalc","isTinAlertShown","isActIncluded","isCustom","isAllCodes","isPrivileged","isTooltipOpen","isFilling","measures","alcoholTabacoCompanies","ImportFromXLS","templateLink","setDocType","importVal","setImportVal","loading","setStatus","templateEnvoice","templateAct","fluid","files","styleInput","ExcelRenderer","resp","rows","getSheetsEnvoice","allImportDocs","getSheetsAct","getSheetsArtSoft","getSheetsCarrefour","getCompanyInfo","file","fileReader","FileReader","readAsArrayBuffer","onload","bufferArray","workBook","XSLX","JDEUPD","sheet_to_json","Sheets","SheetNames","list","sellerObj","sortedObj","forEach","first","buyerObj","filtered","searched","factura","exelDateCorrect","prod","addParams","saveDraft","checkProductCode","productCode","measureCode","units","catalogName","rowHandler","okToSend","counter","productCodeCheck","toFixed","round","asyncBatch","xlsFile","facturaNo","productName","empowermentDate","simpleFactura","allFacturas","sheet","curNo","checkEmpowerDate","chekEmptyCell","cell","NumberNull","productOrdNo","nextProduct","AgentTin","xslFile","simpleAct","allActs","TotalSum","ActNo","ActDate","ActText","ActProductId","ActId","ActDoc","SellerName","BuyerName","BuyerDirector","BuyerAccountant","setDate","paddingBottom","productOptions","vat","filters","api","ListItem","dataView","dataMapping","initFilters","reduce","initPagination","containerRef","useRef","setData","setVat","setFilters","pagination","setPagination","pageNumber","useMemo","ceil","totalCount","isFinite","onPageButtonClicked","prev","isPrevDisabled","isNextDisabled","pageParams","connectedParams","execute","filterViews","property","vatValue","lgotaId","getCatalogInfo","from","mxikName","secondArg","FacturaContext","createContext","FacturaContextProvider","setFactura","properties","setProperties","Provider","onFacturaChange","onPropertiesChange","field","useFacturaContext","useContext","SingleProductRow","privileges","hasExcise","hasMedical","hasVat","hasCommittent","modal","setModal","tooltip","setTooltip","vatEditable","setVatEditable","selectedProduct","cod","handleProductChange","handleMarksChange","addMarks","parseFloat","deliverySum","exciseSum","deliveryWithExcise","amountVat","deliveryWithVat","fetchVatRate","freeToChange","vatRate","lgota","writeVatData","vatRegData","regCode","loadOptions","inputVal","cacheOptions","defaultOptions","menuPosition","searchableSelectStyles","DropdownIndicator","packageNames","Package","nameRu","invalid","validate","ns72_name","provided","valueContainer","lineHeight","tinCommittent","setTinAlert","facturaDate","isCommitent","regCodeStatus","setType","setPriveleges","total","b","fetchTotalMarks","fetchPrivilegies","rowSpan","scope","colSpan","whiteSpace","current","fileObj","newProducts","facturaTypes","singleSidedTypes","otherIncomes","incomeTypes","IncomeTypeSelect","types","offset","ForImport","onFormChanged","countries","setCountries","fetchCountries","country","countryId","defaultValue","PrevInvoiceData","dateFormat","dropdownMode","placeholderText","useRole","isVatPayerPlus","isIndividual","isVatPayerActive","isVatPayerExpired","isVatPayerSuspended","updatedRoles","isUnknown","every","TinAlertModal","onCancel","Center","transformDocument","EmpowermentId","EmpowermentProductId","Agent","AgentEmpowermentId","ContractId","VerificationActId","Id","Data","meta","receiver","RecieverTin","bulkSendThunk","drafts","isLoadingFireActions","rejectedDrafts","draftsPromised","draft","contents","allSettled","sendDocumentThunk","saveDocumentThunk","facturaToAct","sellerInfo","SellerAddress","BuyerAddress","infoToFactura","ProductValuesToFixed","fetchBuyerInfo","isAlertable","formatedDate","Types","facturaType","Additional","hanldeFacturaChange","OneSidedSelect","newFactura","Import","useDebounceFn","delay","timer","debouncedCallback","useCallback","args","clearTimeout","FacturaInfo","setIsFilling","handleFacturaChange","handleLotIdFetch","fetchExchangeInfo","exchangeInfo","exchangeProducts","totalSum","planPositionId","productProperties","measureId","ExchangeInfo","ProductCode","ProductProperties","PlanPositionId","debouncedLotIdFetch","handleLotIdChange","handleWaybillSubmit","preventDefault","WaybillId","fetchWaybill","formattedDate","fetchVatRegCode","sellerRes","buyerRes","active","htmlFor","autoComplete","writeInfoAgent","Factura","docCreateReducer","setSellerInfo","sellerBranches","setSellerBranches","buyerBranches","setBuyerBranches","isSellerInvalid","isBuyerInvalid","Corrected","CompensationCorrected","getFacturaErrors","handlePropertiesChange","handleIncomeTypeSelect","handleTinAlertCancel","toISOString","handleFacturaInit","branches","branch","branchNum","branchName","handleDocumentSend","facturaCleaned","cleanUpFacturaObj","act","handleDocumentSave","handleIsBudgetChange","handleBuyerInfoChange","buyerTinLength","contentsProducts","some","setNewDoc","setCurDoc","revert","setBuyerFromSeller","included","OtherIncome","marginLeft","small","tag","signatures","oldFactura","facturaCleanup","CompanyInfo","caption","isPinfl","defaultEmpowerment","EmpowermentDoc","EmpowermentDateOfExpire","JobTitle","Passport","DateOfIssue","IssuedBy","useHookstate","onProductChanged","set","onInputChanged","none","Contract","onAgentTinChanged","handleDocChange","innerKey","onDateChanged","Empowerment","sendDoc","saveDoc","docObj","onTinChanged","func","rest","getdocDef","writeInfoSeller","merge","passSeries","passNumber","passIssueDate","passOrg","AgentFIO","autoCalc","updateTable","measure","table","setTable","hasFuel","pop","Act","setAutoCalc","setDoc","writeInfoBuyer","HasFuel","saveAct","PDF","docDef","SenderTin","SenderName","RecieverName","Meta","setUrl","pageNum","setPageNum","handleFormChange","handleTinChange","handleSend","createObjectURL","onLoadSuccess","numPages","fill","_","ind","getElementsByClassName","offsetWidth","reader","readAsDataURL","fetchIdLocal","pdfjs","GlobalWorkerOptions","workerSrc","Preview","isFullWidth","setIsFullWidth","normalScreenIcon","fullScreenIcon","passPreview","documentIframe","getElementById","contentDocument","saveAsNew","emptyObj","companyInfo","Custom","setContent","loadEditor","DecoupledEditor","create","querySelector","language","editor","toolbar","model","on","getData","onTinSearched","maxLength","fizName","handleActChange","getCaptionKey","Info","handleActDocChange","VerificationActDoc","VerificationActNo","VerificationActDate","VerificationActContractItem","OwnerOperationDate","OwnerOperationName","OwnerDebit","OwnerCredit","PartnerOperationDate","PartnerOperationName","PartnerDebit","PartnerCredit","VerificationActContract","VerificationActContractItems","OpenBalance","CloseBalance","TotalBalance","VerificationAct","VerificationActText","OwnerTin","OwnerName","OwnerFizFio","OwnerFizTin","PartnerTin","PartnerName","PartnerFizTin","PartnerFizFio","VerificationActContracts","TurnoverBalance","ActInput","debitValue","onDebitChanged","debitPlaceholder","creditValue","onCreditChanged","creditPlaceholder","ContractItem","handleChange","d","contract","handleContractChange","innerField","contractItem","Contracts","uuidv4","ActDescription","sendAct","clear","setContract","addSubstract","Clients","Owner","partDef","Body","productDef","BarCode","PersonDef","Fax","contractDef","ContractName","ContractExpireDate","ContractPlace","Parts","Product","custom","allCods","handleContactChange","setAllCods","setCustom","sendContract","saveContract","client","emptyBlockStyle","iconStyle","sender","wayBill","setWayBill","changeText","CustomerName","CarrierName","CustomerTin","CarrierTin","PointDocs","point","PointOfLoading","PointOfUnloading","RoadHaulageCost","FollowDocuments","MethodDefineWeight","LoadClass","WeightBrutto","WeightNetto","billDef","WaybillDoc","WaybillNo","WaybillDate","DeliveryType","TripTicketDoc","TripTicketNo","TripTicketDate","TruckDoc","TruckRegNo","TruckModel","TrailerDoc","TrailerType","TrailerRegNo","TrailerModel","DriverFio","PointOfRedirectName","PointOfRedirectAddress","SpecialNotes","GiverFio","GiverDriverFio","TakerFio","TakerDriverFio","DeliveryDistanceDoc","DeliveryDistance","DeliveryDistanceInCity","WaybillProductId","WayBill","xsx","WaybillLocalId","Consignor","TinOrPinfl","Consignee","FreightForwarder","Carrier","isVisibleClient","isVisibleUnloadingTrustee","isVisiblePayer","isVisibleLoadingTrustee","isVisibleUnloadingEmpowerment","isVisibleTrailer","Client","Payer","ResponsiblePerson","FullName","TransportType","Roadway","OtherCarOwners","Driver","Truck","RegNo","Model","Trailer","Carriages","ProductGroups","LoadingPoint","RegionId","RegionName","DistrictCode","DistrictName","MahallaId","MahallaName","Longitude","Latitude","LoadingTrustee","UnloadingPoint","UnloadingTrustee","UnloadingEmpowerment","ProductInfo","TotalDeliverySum","TotalWeightBrutto","CommittentTinOrPinfl","ProductName","Amount","Price","Airway","Railway","Shipway","TotalDistance","DeliveryCost","TotalDeliveryCost","makeAutoObservable","autoBind","splice","tableIndex","RoadwayForm1","observer","Store","changeRoadwayObjValue","getInfo","CustomLoader","TextInput","trim","w","rightSection","variant","RoadwayForm2","toggleVisibility","transports","setTransports","fetchTransports","regNo","opacity","isSearchable","RoadwayOtherCarOwners","addCarOwner","editCarOwnersValue","deleteCarOwner","CustomRow","finally","RoadwayCarriages","addCarriage","editCarriagesValue","deleteCarriage","ProductGroupForm1","changeProductGroupsObjValue","regions","setRegions","districts","setDisctricts","mahalla","setMahalla","lat","lon","latlon","setLatLon","toggleMapModal","getRegions","fetchRegions","getDistricts","fetchDistricts","getMahalla","fetchVillages","clearSelect","lang","load","coords","modules","defaultState","center","zoom","geometry","h","ProductGroupForm2","visible","DatePickerInput","dayjs","valueFormat","ProductGroupInfo","changeProductGroupsHasCommittent","ProductGroupTable","addProductInfoTable","deleteProductInfoTable","editProductInfoTable","overflowX","dataIndex","ProductGroupItem","removeGroup","minimized","setMinimized","addNewGroup","RoadwayForm3","isError","changeObjValue","changeDeliveryType","mx","maw","getText","Form1","setBranches","getBranchesAndInfo","actualLabel","inputColor","branchCode","Form2","WayBillNew","dataValidation","resetStore","validObj","tempLoadingPoint","tempUnloadingPoint","tempLoadingTrustee","tempUnloadingTrustee","tempUnloadingEmpowerment","tempProductInfo","rowIndex","element2","classList","remove","scrollIntoView","behavior","block","inline","MantineProvider","withGlobalStyles","withNormalizeCSS","spcBetween","CreateDoc","CreateDocBody","curDoc","Header","showSettings","setShowSettings","confirmModalOpen","setConfirmModalOpen","importXLS","setImportXLS","showList","setShowList","docsTableReducer","onCloseShowListHandler","ListEl","SettingsEl","logOut","confirmModal","importExcel","logo","dirs","setFilter","docTypes","Hamburger","icon","Cog","sidePinned","setShowSide","showSide","Balance","setPaymentModalIsOpen","setPromoModalOpen","onBalanceFetched","UsdIcon","BalanceData","numberWithSpaces","RefreshIcon","span","x","Filter","viewBox","xmlns","stroke","strokeWidth","strokeLinecap","DatePickerLavina","DatePickerStyled","DatePicker","DivRStyle","childrenBody","selectedDiv","selectedDivStyle","pStyle","divStyle","tStyle","DivR","wrapStyle","SummType","StyledInput","input","handleFilterChange","handleValueChange","handleDateChange","getTime","toDate","InputStyled","tinName","RowToolBar","dateType","dateTypes","Row","Newbar","summType","dateAmount","SumRow","summFrom","funname","summTo","h2","SumValue","lavinaTin","SideBar","filterDefault","setSidePinned","textBtnPanel","MainContainer","PayerName","setProvider","ClientTin","ProviderTins","Common","ResetButton","Container","Status","isText","Table","setActive","allRowsActive","setAllRowsActive","showTotal","correct","tablesStyle","getCheckboxState","toggleAllRowsActive","rowClass","findIndex","leng","partner","newRows","SetPage","pages","PrvePage","nextPage","docsReducer","PrvePaget","nextPaget","floor","rome","inpStyle","min","max","ExcelExport","filteredBy","getFilteredBy","TableToExcel","convert","colspan","getDocDir","rowspan","filterdBy","DocumentViewModal","selectedDocs","setSelectedDocs","setNotes","showNotes","setShowNotes","tooltipIsOpened","setTooltipIsOpened","actionButtons","docTypesAllowedToBeCopied","handleDraftRemove","delete","test","outerHTML","iframeReady","signDoc","cancel","hostname","sendDraft","printFrame","notesModal","fetchSign","docSign","reply","convertDocType","Document","frm","contentWindow","focus","print","TableSettings","entries","TypeButtons","listActive","onDraftSent","onDraftRemoved","onInboxSigned","onOutboxCancelled","times","isDocsLoading","setIsDocsLoading","apply","StyledBody","onLoad","onError","ModalBody","frms","querySelectorAll","handleBatch","TableView","isPrinting","setIsPrinting","collapsed","setCollapsed","debouncedFetchFilteredDocs","handleKeydown","ctrlKey","altKey","addEventListener","removeEventListener","bulkDeleteDrafts","bulkSignInbox","bulkCancelOutbox","docsCount","allDocs","fetchDocsForExport","goToPayme","summ","paramsString","btoa","PaymentModal","paymentModalIsOpen","paymeSelected","setPaymeSelected","planChangeIsOpen","setPlanChangeIsOpen","setSumm","planSelected","setPlanSelected","textDecoration","PromoModal","promoModalIsOpen","setCode","enablePromo","promos","FacturaMandatoryRegistration","localStorage","setShow","notificationWrapperStyle","buttons","saveValueInLS","MainView","curTin","setCurTin","isPaymentModalOpen","setIsPaymentModalOpen","isPromoModalOpen","setIsPromoModalOpen","sidebar","rightUnpinned","rightHidden","overlay","main","transform","filterDate","ProtectedView","conatainerStyle","logoSt","tryFactura","styleDiv","disabledSign","disabledReject","to","iframe","dev","ErrorPage","docSignerTin","AppContragent","isNotEligibleToSing","setIsNotEligibleToSign","setDocSignerTin","contragentReducer","loadingVals","queryString","getDocForContragent","checkEligibility","mesage","isEligibleToSign","Routes","routes","route","exact","component","compnent","Helmet","useLoading","Root","isAppLoading","setAppLoading","TagManager","initialize","gtmId","ReactDOM","render","basename","REACT_APP_BASENAME"],"mappings":"mcAAA,SAASA,EAAoBC,GAC5B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBF,EAAM,KAEjD,MADAC,EAAEE,KAAO,mBACHF,EAEPF,EAAoBK,KAAO,WAAa,MAAO,IAC/CL,EAAoBM,QAAUN,EAC9BO,EAAOC,QAAUR,EACjBA,EAAoBS,GAAK,K,i3HCPZC,EAAqB,qBAGrBC,EAAgC,gCAEhCC,EAAoB,oBCA3BC,EAAe,CACnBC,KAAM,GACNC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AwB,CACnC,GAAI,KACJ,GAAI,KACJ,GAAI,GACJ,GAAI,GACJ,GAAI,IAcOC,GAA0B,CACrCC,QAAS,EACTC,gBAAiB,EACjBC,WAAY,EACZC,YAAa,EACbC,UAAW,GACXC,YAAY,EACZC,WAAY,CACVC,UAAW,GACXC,YAAa,IAEfC,cAAe,CACbC,aAAc,GACdC,aAAc,GACdC,eAAgB,IAElBC,YAAa,CACXC,WAAY,GACZC,aAAc,IAEhBC,sBAAuB,CACrBC,eAAgB,GAChBC,cAAe,GACfC,uBAAwB,GACxBC,SAAU,GACVC,WAAY,IAEdC,gBAAiB,CACfC,gBAAiB,GACjBC,kBAAmB,IAErBC,UAAW,GACXC,SAAU,GACVC,MAAO,GACPC,OAAQlC,GACRmC,MAAOnC,GACPoC,eAAgB,CACdC,UAAW,GACX75B,KAAM,GACNO,QAAS,GACTu5B,KAAM,GACN35B,QAAS,IAEX45B,YAAa,CACXC,iBAAkB,GAClBl6B,IAAK,GACLm6B,WAAW,EACXC,eAAe,EACfC,YAAY,EACZC,QAAQ,EACRC,sBAAsB,EACtBC,SAAU,CAACzE,MAIF0E,GAAyC,CACpDC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,eAAe,EACf3X,UAAU,EACV4X,WAAW,GAGAC,GAAW,CACtB,CACExgC,MAAO,IACPotB,KAAM,4BAER,CACEptB,MAAO,IACPotB,KAAM,kCAER,CACEptB,MAAO,IACPotB,KAAM,kCAER,CACEptB,MAAO,IACPotB,KAAM,0DAER,CACEptB,MAAO,IACPotB,KAAM,gEAER,CACEptB,MAAO,IACPotB,KAAM,kCAER,CACEptB,MAAO,IACPotB,KAAM,8CAER,CACEptB,MAAO,KACPotB,KAAM,oDAER,CACEptB,MAAO,IACPotB,KAAM,0DAER,CACEptB,MAAO,IACPotB,KAAM,0DAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,oDAER,CACEptB,MAAO,KACPotB,KAAM,wEAER,CACEptB,MAAO,KACPotB,KAAM,0CAER,CACEptB,MAAO,KACPotB,KAAM,kEAER,CACEptB,MAAO,KACPotB,KAAM,wEAER,CACEptB,MAAO,KACPotB,KAAM,wEAER,CACEptB,MAAO,KACPotB,KAAM,kEAER,CACEptB,MAAO,KACPotB,KAAM,gDAER,CACEptB,MAAO,KACPotB,KAAM,qDAER,CACEptB,MAAO,KACPotB,KAAM,sBAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,wEAER,CACEptB,MAAO,KACPotB,KAAM,sBAER,CACEptB,MAAO,KACPotB,KAAM,0DAER,CACEptB,MAAO,KACPotB,KAAM,oDAER,CACEptB,MAAO,KACPotB,KAAM,kCAER,CACEptB,MAAO,KACPotB,KAAM,sBAER,CACEptB,MAAO,KACPotB,KAAM,sBAER,CACEptB,MAAO,KACPotB,KAAM,wCAER,CACEptB,MAAO,KACPotB,KAAM,gEAER,CACEptB,MAAO,KACPotB,KAAM,wCAER,CACEptB,MAAO,KACPotB,KAAM,8CAER,CACEptB,MAAO,KACPotB,KAAM,8CAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,oDAER,CACEptB,MAAO,KACPotB,KAAM,kCAER,CACEptB,MAAO,KACPotB,KAAM,qDAER,CACEptB,MAAO,KACPotB,KAAM,wCAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,kCAER,CACEptB,MAAO,KACPotB,KAAM,oDAER,CACEptB,MAAO,KACPotB,KAAM,kCAER,CACEptB,MAAO,IACPotB,KAAM,wCAER,CACEptB,MAAO,KACPotB,KAAM,8CAER,CACEptB,MAAO,KACPotB,KAAM,4BAER,CACEptB,MAAO,KACPotB,KAAM,gEAER,CACEptB,MAAO,KACPotB,K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AAU1xD,MAAOA,GAAjB,SACE,eAAC,cAAD,CAAac,UAAWA,GAAxB,SACE,gBAAC,IAAD,CAAe6wD,SAAUxxD,oIAAYyxD,oBAAsB,GAA3D,UACE,eAAC,GAAD,IACA,eAAC,KAAD,CACEj/D,MAAO,CACLqQ,QAAS,sBACTM,SAAU,mBACVV,MAAO,QACPsb,SAAU,kBAMpB3rB,SAASy6C,eAAe,W","file":"static/js/main.3e0306fa.chunk.js","sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 836;","export const FETCH_DOCS_PENDING = \"FETCH_DOCS_PENDING\";\nexport const FETCH_DOCS_SUCCESS = \"FETCH_DOCS_SUCCESS\";\nexport const FETCH_DOCS_ERROR = \"FETCH_DOCS_ERROR\";\nexport const FETCH_DOCS_FOR_EXPORT_PENDING = \"FETCH_DOCS_FOR_EXPORT_PENDING\";\nexport const FETCH_DOCS_FOR_EXPORT_SUCCESS = \"FETCH_DOCS_FOR_EXPORT_SUCCESS\";\nexport const FETCH_DOCS_FOR_EXPORT_ERROR = \"FETCH_DOCS_FOR_EXPORT_ERROR\";\nexport const SET_DOCS_TO_PRINT = \"SET_DOCS_TO_PRINT\";\n","import {\n FETCH_DOCS_SUCCESS,\n FETCH_DOCS_FOR_EXPORT_SUCCESS,\n SET_DOCS_TO_PRINT\n} from \"../constants/docs\";\n\nconst initialState = {\n docs: [],\n docsToExport: [],\n pageCount: 0,\n docsToPrint: []\n};\n\nexport default function docs(state = initialState, { type, payload }) {\n switch (type) {\n case FETCH_DOCS_SUCCESS:\n return {\n ...state,\n docs: payload.data.data,\n pageCount: payload.data.pageCount\n };\n case FETCH_DOCS_FOR_EXPORT_SUCCESS:\n return {\n ...state,\n docsToExport: payload\n };\n case SET_DOCS_TO_PRINT:\n return {\n ...state,\n docsToPrint: payload\n };\n default:\n return state;\n }\n}\n","export const FETCH_COMPANIES_PENDING = \"FETCH_COMPANIES_PENDING\";\nexport const FETCH_COMPANIES_SUCCESS = \"FETCH_COMPANIES_SUCCESS\";\nexport const FETCH_COMPANIES_ERROR = \"FETCH_COMPANIES_PENDING\";\nexport const REQUEST_COMPANY_INFO_SET_PENDING =\n \"REQUEST_COMPANY_INFO_SET_PENDING\";\nexport const REQUEST_COMPANY_INFO_SET_SUCCESS =\n \"REQUEST_COMPANY_INFO_SET_SUCCESS\";\nexport const REQUEST_COMPANY_INFO_SET_ERROR = \"REQUEST_COMPANY_INFO_SET_ERROR\";\nexport const SET_COMPANY_SET_AUTO = \"SET_COMPANY_SET_AUTO\";\n","import { TinInfoType } from \"@models/CompanyTypes\";\nimport structuredClone from \"@ungap/structured-clone\";\nimport { Base64 } from \"js-base64\";\nimport moment from \"moment\";\n// import cloneDeep from \"lodash.clonedeep\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nexport function saveValue(key, value) {\n window.sessionStorage.setItem(key, JSON.stringify(value));\n}\n\nexport const setValue = (key: string, value: any) => {\n sessionStorage.setItem(key, JSON.stringify(value));\n};\n\nexport function getValue(key) {\n return JSON.parse(window.sessionStorage.getItem(key)!);\n}\n\nexport function saveValueInLS(key, value) {\n window.localStorage.setItem(key, JSON.stringify(value));\n}\n\nexport function getValueFromLS(key) {\n return JSON.parse(window.localStorage.getItem(key)!);\n}\n\nexport function setObjectState(state, setState, key, value) {\n let obj = state;\n obj[key] = value;\n setState({ ...state, [key]: value });\n}\n\nexport function download(filename, text) {\n var element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n}\n\nexport function dateF(date) {\n if (date && typeof date == \"string\") return dateFormatter(date);\n\n if (!date) return null;\n\n if (typeof date == \"object\")\n return (\n date.getFullYear() +\n \"-\" +\n String(date.getMonth() + 1).padStart(2, \"0\") +\n \"-\" +\n String(date.getDate()).padStart(2, \"0\")\n );\n\n return null;\n}\n\n/* Форматирование Дат */\n// 19.04.2020\n/* 2010-08-05 */\nfunction dateFormatter(t) {\n if (t.includes(\".\")) {\n const arr = t.split(\".\");\n\n let year = arr[2],\n month = arr[1],\n day = arr[0];\n return year + \"-\" + month + \"-\" + day;\n }\n return t;\n}\n\nexport function toast(toaster, message, type = \"info\") {\n if (toaster !== undefined) toaster(message, type);\n}\n\nexport function addZero(digits_length, source) {\n var text = source + \"\";\n while (text.length < digits_length) text = \"0\" + text;\n return text;\n}\n\nexport function roundFloat(value, exp, type = \"round\") {\n // Если степень не определена, либо равна нулю...\n if (typeof exp === \"undefined\" || +exp === 0) {\n return Math[type](value);\n }\n value = +value;\n exp = +exp;\n // Если значение не является числом, либо степень не является целым числом...\n if (isNaN(value) || !(typeof exp === \"number\" && exp % 1 === 0)) {\n return NaN;\n }\n // Сдвиг разрядов\n value = value.toString().split(\"e\");\n value = Math[type](+(value[0] + \"e\" + (value[1] ? +value[1] - exp : -exp)));\n // Обратный сдвиг\n value = value.toString().split(\"e\");\n return +(value[0] + \"e\" + (value[1] ? +value[1] + exp : exp));\n}\n\nexport const deleteProduct = (products, product, setProducts) => {\n const newProductsList = products.filter(\n (item) => item.OrdNo !== product.OrdNo\n );\n setProducts(\n newProductsList.map((item, idx) => ({ ...item, OrdNo: idx + 1 }))\n );\n};\nexport const addSpaceBetweenDigits = (num) => {\n return Number(num.replace(/\\D/g, \"\")).toLocaleString(\"ru-RU\", {\n minimumFractionDigits: 2,\n });\n};\n\nexport function toCurrency(num) {\n return num ? num.toLocaleString() : 0;\n}\n\nexport function isEmptyObject(obj) {\n // eslint-disable-next-line eqeqeq\n if (obj == undefined) return true;\n\n for (const prop in obj) return obj.hasOwnProperty(prop);\n\n return JSON.stringify(obj) === JSON.stringify({});\n}\n\nexport const getParams = (params) => {\n const mappedParams = Object.keys(params).map((param) => {\n if (!params[param] && params[param] !== 0) return \"\";\n\n return param + \"=\" + params[param];\n });\n\n const filteredParams = mappedParams.filter((param) => param);\n\n return filteredParams;\n};\n\nexport const isPhis = (tinOrPinfl) => {\n if (\n tinOrPinfl.length === 10 ||\n tinOrPinfl.charAt(0) === \"2\" ||\n tinOrPinfl.charAt(0) === \"3\"\n )\n return false;\n\n return true;\n};\n\nexport const deepClone = (value: Type) => structuredClone(value);\n\nexport const makeUid = () => uuidv4();\n\nexport const after = (times: number, func: Function) => {\n return function () {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n};\n\nexport function sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport const encode = (type: string) => {\n return Base64.encode(type);\n};\n\nexport const decode = (type: string) => {\n return Base64.decode(type);\n};\n\nexport const numberToString = (number: number) => {\n return number > 9 ? String(number) : `0${number}`;\n};\n\nexport const getFactoredInfo = (data: TinInfoType) => {\n const { info, vatRegCode, taxPayerType, taxGap } = data;\n\n const status = taxPayerType.data.code;\n const isPhis = status === 60;\n\n const obj = {\n Tin: info.tin || '',\n Name: isPhis ? info.name : info.shortName ? info.shortName : info.name,\n Account: isPhis ? \"\" : info.account || '',\n BankId: isPhis ? \"\" : info.mfo || '',\n Address: info.address,\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: isPhis ? \"\" : info.oked || '',\n DistrictId: numberToString(info.ns10Code) + numberToString(info.ns11Code),\n Director: isPhis ? \"\" : info.director || '',\n DirectorTin: isPhis ? \"\" : info.directorTin || '',\n Accountant: isPhis ? \"\" : info.accountant || '',\n VatRegCode: vatRegCode,\n VatRegStatus: status,\n TaxGap: taxGap,\n Pinfl: String(isPhis ? info.personalNum : info.directorPinfl),\n IsPhis: isPhis,\n };\n\n return obj;\n};\n\nexport const handleJsonCorrection = (text: string) => {\n return (\n text\n .replace(/\\\\n/g, \"\\\\n\")\n .replace(/\\\\'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\\\\\"')\n .replace(/\\\\&/g, \"\\\\&\")\n .replace(/\\\\r/g, \"\\\\r\")\n .replace(/\\\\t/g, \"\\\\t\")\n .replace(/\\\\b/g, \"\\\\b\")\n .replace(/\\\\f/g, \"\\\\f\")\n // eslint-disable-next-line no-control-regex\n .replace(/[\\u0000-\\u0019]+/g, \"\")\n );\n};\n\nexport const getFormattedDate = () => moment().format(\"DD.MM.YYYY\");\n\nexport const arrayToString = (...array: Array) => {\n return array.filter(Boolean).join(\" \");\n};\n\nexport const getCorrectQueries = (queries: { name: string; value: any }[]) => {\n const values = queries.map((query) => {\n if (query.value === undefined || query.value === null) return \"\";\n return `${query.name}=${query.value}`;\n });\n\n return arrayToString(...values)\n .split(\" \")\n .join(\"&\");\n};\n\nexport const isObject = (obj: Type) => typeof obj === 'object' &&\n !Array.isArray(obj) &&\n obj !== null\n\nexport const isArray = (array: any[]) => Array.isArray(array);\n\n\nexport const getCasedObject = (oldFormat: Object, desiredFormat: Type) => {\n let newObj = {} as Type;\n\n for (const key in oldFormat) {\n let correctName = '';\n\n for (const correctKey in desiredFormat) {\n if (correctKey.toLocaleLowerCase() === key.toLocaleLowerCase()) {\n correctName = correctKey;\n break;\n }\n }\n if (correctName === '') continue;\n\n const objectValue = oldFormat[key];\n\n let value;\n\n if (isObject(objectValue)) value = getCasedObject(oldFormat[key], desiredFormat[correctName]);\n else if (isArray(objectValue)) {\n value = (objectValue as any[]).map(item => getCasedObject(item, desiredFormat[correctName][0]))\n }\n else value = objectValue\n\n\n newObj = {\n ...newObj,\n [correctName]: value\n }\n }\n\n return newObj;\n}\n\n\n\nexport const clearSlash = (url: string) => {\n return url.split('/').filter(Boolean).join('/')\n}","import {\n FETCH_COMPANIES_SUCCESS,\n REQUEST_COMPANY_INFO_SET_SUCCESS,\n REQUEST_COMPANY_INFO_SET_PENDING,\n REQUEST_COMPANY_INFO_SET_ERROR,\n SET_COMPANY_SET_AUTO,\n} from \"../constants/companies\";\nimport { getValue } from \"../../utils/helpers\";\n\nconst providerFromSession = getValue(\"provider\");\n\nconst initialState = {\n companies: [],\n setCompanyCompleted: true,\n providerIsSet: providerFromSession\n ? providerFromSession[\"providerIsSet\"]\n : false,\n providers: providerFromSession ? providerFromSession[\"providers\"] : [],\n setAuto: true,\n};\n\nexport default function companies(state = initialState, { type, payload }) {\n switch (type) {\n case FETCH_COMPANIES_SUCCESS:\n return {\n ...state,\n pending: false,\n companies: payload.companies,\n };\n case REQUEST_COMPANY_INFO_SET_PENDING:\n return {\n ...state,\n setCompanyCompleted: false,\n };\n case REQUEST_COMPANY_INFO_SET_SUCCESS:\n return {\n ...state,\n pending: false,\n setCompanyCompleted: true,\n providerIsSet: payload.providerIsSet,\n providers: payload.providers,\n };\n case REQUEST_COMPANY_INFO_SET_ERROR: {\n return {\n ...state,\n setCompanyCompleted: true,\n };\n }\n case SET_COMPANY_SET_AUTO: {\n return {\n ...state,\n setAuto: payload,\n };\n }\n default:\n return state;\n }\n}\n\nexport const getCompanies = (state) => state.docs;\n","export const SET_DOC_IS_ADDITIONAL = \"SET_DOC_IS_ADDITIONAL\";\nexport const SET_DOC_CREATED_IS_PREVIEWED = \"SET_DOC_CREATED_IS_PREVIEWED\";\nexport const CHANGED_DOC_CREATE_FORM = \"CHANGED_DOC_CREATE_FORM\";\nexport const CLOSED_DOC_CREATE_FORM = \"CLOSED_DOC_CREATE_FORM\";\nexport const REQUESTED_DOC_CREATE_BY_COPY = \"REQUESTED_DOC_CREATE_BY_COPY\";\nexport const REQUESTED_DOC_CREATE_BY_COPY_FINISHED =\n \"REQUESTED_DOC_CREATE_BY_COPY_FINISHED\";\nexport const REQUEST_DOC_BEING_COPIED_INFO_PENDING =\n \"REQUEST_DOC_BEING_COPIED_INFO_PENDING\";\nexport const REQUEST_DOC_BEING_COPIED_INFO_SUCCESS =\n \"REQUEST_DOC_BEING_COPIED_INFO_SUCCESS\";\nexport const REQUEST_DOC_BEING_COPIED_INFO_ERROR =\n \"REQUEST_DOC_BEING_COPIED_INFO_ERROR\";\n","import {\n CHANGED_DOC_CREATE_FORM,\n CLOSED_DOC_CREATE_FORM,\n REQUESTED_DOC_CREATE_BY_COPY,\n REQUESTED_DOC_CREATE_BY_COPY_FINISHED,\n REQUEST_DOC_BEING_COPIED_INFO_SUCCESS,\n SET_DOC_IS_ADDITIONAL,\n SET_DOC_CREATED_IS_PREVIEWED\n} from \"../constants/docCreate\";\n\nconst initialState = {\n doc: {},\n formChanged: false,\n docBeingCopiedId: null,\n docBeingCopiedData: null,\n docIsBeingCopied: false,\n docIsAdditional: false,\n docIsAdditionalType: null,\n docIsPreviewed: false,\n docPreviewedData: null\n};\n\nexport default function docCreate(state = initialState, { type, payload }) {\n switch (type) {\n case CHANGED_DOC_CREATE_FORM:\n return {\n ...state,\n formChanged: payload\n };\n case CLOSED_DOC_CREATE_FORM:\n return {\n ...state,\n formChanged: false\n };\n case REQUESTED_DOC_CREATE_BY_COPY:\n return {\n ...state,\n docBeingCopiedId: payload,\n docIsBeingCopied: true\n };\n case REQUESTED_DOC_CREATE_BY_COPY_FINISHED:\n return {\n ...state,\n docBeingCopiedId: null,\n docIsBeingCopied: false,\n docBeingCopiedData: null,\n docIsAdditional: false,\n docIsAdditionalType: null\n };\n case REQUEST_DOC_BEING_COPIED_INFO_SUCCESS: {\n return {\n ...state,\n docBeingCopiedData: payload\n };\n }\n case SET_DOC_IS_ADDITIONAL: {\n return {\n ...state,\n docIsAdditional: true,\n docIsAdditionalType: payload\n };\n }\n case SET_DOC_CREATED_IS_PREVIEWED: {\n return {\n ...state,\n docIsPreviewed: payload.docIsPreviewed,\n docPreviewedData: payload.docPreviewedData\n };\n }\n default:\n return state;\n }\n}\n","const loadingReducer = (state = [], action) => {\n const { type } = action;\n const matches = /(.*)_(PENDING|SUCCESS|ERROR)/.exec(type);\n\n // not a *_REQUEST / *_SUCCESS / *_ERROR actions, so we ignore them\n if (!matches) return state;\n\n const [, requestName, requestState] = matches;\n return {\n ...state,\n // Store whether a request is happening at the moment or not\n // e.g. will be true when receiving GET_TODOS_REQUEST\n // and false when receiving GET_TODOS_SUCCESS / GET_TODOS_ERROR\n [requestName]: requestState === \"PENDING\"\n };\n};\n\nexport default loadingReducer;\n","export const FETCH_BALANCE_PENDING = \"FETCH_BALANCE_PENDING\";\nexport const FETCH_BALANCE_SUCCESS = \"FETCH_BALANCE_SUCCESS\";\nexport const FETCH_BALANCE_ERROR = \"FETCH_BALANCE_ERROR\";\n","import { FETCH_BALANCE_SUCCESS } from \"../constants/balance\";\n\nconst initialState = {\n balance: { money: 0, tarif: 0, package: 0, date: \"\" },\n};\n\nexport default function balance(state = initialState, { type, payload }) {\n switch (type) {\n case FETCH_BALANCE_SUCCESS:\n return {\n ...state,\n balance: { ...state.balance, ...payload.balance },\n };\n default:\n return state;\n }\n}\n","export const CHANGE_COLUMN_VISIBILITY = \"CHANGE_COLUMN_VISIBILITY\";\nexport const CHANGE_PER_PAGE_LIMIT = \"CHANGE_PER_PAGE_LIMIT\";\nexport const CHANGE_SORT_BY_COLUMN = \"CHANGE_SORT_BY_COLUMN\";\nexport const SET_NEED_TO_RELOAD = \"SET_NEED_TO_RELOAD\";\nexport const CHANGE_SORT_DIRECTION = \"CHANGE_SORT_DIRECTION\";\n","/* THIS REDUCER'S DATA IS PERSISTENT. \nIF YOU WANT TO SEE CHANGES YOUVE MADE UPDATE LOCAL STORAGE */\n\nimport {\n CHANGE_COLUMN_VISIBILITY,\n CHANGE_PER_PAGE_LIMIT,\n CHANGE_SORT_BY_COLUMN,\n SET_NEED_TO_RELOAD,\n CHANGE_SORT_DIRECTION\n} from \"../constants/docsTable\";\n\nconst initialState = {\n columnsToShow: {\n docType: { show: true, title: \"Тип документа\" },\n docDate: { show: true, title: \"Дата документа\" },\n updateDate: { show: false, title: \"Последнее обновление\" },\n docNo: { show: true, title: \"Номер документа\" },\n contractNo: { show: false, title: \"Номер контракта\" },\n contractDate: { show: false, title: \"Дата контракта\" },\n partnerTin: { show: true, title: \"ИНН\" },\n summa: { show: true, title: \"Сумма\" }\n },\n limit: 10,\n sortBy: \"updateDate\",\n isSortDireactionDesc: true,\n needToReload: false\n};\n\nexport default function docsTable(state = initialState, { type, payload }) {\n switch (type) {\n case CHANGE_COLUMN_VISIBILITY:\n return {\n ...state,\n columnsToShow: {\n ...state.columnsToShow,\n [payload]: {\n ...state.columnsToShow[payload],\n show: !state.columnsToShow[payload].show\n }\n }\n };\n case CHANGE_PER_PAGE_LIMIT:\n return {\n ...state,\n limit: payload\n };\n case CHANGE_SORT_DIRECTION:\n return {\n ...state,\n isSortDireactionDesc: payload\n };\n case CHANGE_SORT_BY_COLUMN:\n if (state.sortBy === payload) {\n return {\n ...state,\n isSortDireactionDesc: !state.isSortDireactionDesc\n };\n }\n return {\n ...state,\n sortBy: payload\n };\n case SET_NEED_TO_RELOAD:\n return {\n ...state,\n needToReload: payload\n };\n default:\n return state;\n }\n}\n","export const FETCH_DOC_PENDING = \"FETCH_DOC_PENDING\";\nexport const FETCH_DOC_SUCCESS = \"FETCH_DOC_SUCCESS\";\nexport const FETCH_DOC_ERROR = \"FETCH_DOC_ERROR\";\nexport const SET_NEED_TO_RELOAD = \"SET_NEED_TO_RELOAD\";\n","import {\n FETCH_DOC_SUCCESS,\n FETCH_DOC_ERROR,\n SET_NEED_TO_RELOAD\n} from \"../constants/contragent\";\n\nconst initialState = {\n doc: null,\n needToReload: false\n};\n\nexport default function contragent(state = initialState, { type, payload }) {\n switch (type) {\n case FETCH_DOC_SUCCESS:\n return {\n ...state,\n doc: payload\n };\n case FETCH_DOC_ERROR:\n return {\n ...state,\n doc: 404\n };\n case SET_NEED_TO_RELOAD:\n return {\n ...state,\n needToReload: payload\n };\n default:\n return state;\n }\n}\n","export const FETCH_CURRENT_PLAN_PENDING = \"FETCH_CURRENT_PLAN_PENDING\";\nexport const FETCH_CURRENT_PLAN_SUCCESS = \"FETCH_CURRENT_PLAN_SUCCESS\";\nexport const FETCH_CURRENT_PLAN_ERROR = \"FETCH_CURRENT_PLAN_ERROR\";\nexport const FETCH_ALL_PLANS_PENDING = \"FETCH_ALL_PLANS_PENDING\";\nexport const FETCH_ALL_PLANS_SUCCESS = \"FETCH_ALL_PLANS_SUCCESS\";\nexport const FETCH_ALL_PLANS_ERROR = \"FETCH_ALL_PLANS_ERROR\";\nexport const REQUEST_CURRENT_PLAN_CHANGE_PENDING =\n \"REQUEST_CURRENT_PLAN_CHANGE_PENDING\";\nexport const REQUEST_CURRENT_PLAN_CHANGE_SUCCESS =\n \"REQUEST_CURRENT_PLAN_CHANGE_SUCCESS\";\nexport const REQUEST_CURRENT_PLAN_CHANGE_ERROR =\n \"REQUEST_CURRENT_PLAN_CHANGE_ERROR\";\nexport const REQUEST_PLAN_RESET_PENDING = \"REQUEST_PLAN_RESET_PENDING\";\nexport const REQUEST_PLAN_RESET_SUCCESS = \"REQUEST_PLAN_RESET_SUCCESS\";\nexport const REQUEST_PLAN_RESET_ERROR = \"REQUEST_PLAN_RESET_ERROR\";\n","import {\n FETCH_ALL_PLANS_SUCCESS,\n FETCH_CURRENT_PLAN_SUCCESS,\n REQUEST_CURRENT_PLAN_CHANGE_SUCCESS\n} from \"../constants/plans\";\n\nconst initialState = {\n plans: [],\n currentPlan: null\n};\n\nexport default function plans(state = initialState, { type, payload }) {\n switch (type) {\n case FETCH_ALL_PLANS_SUCCESS:\n return {\n ...state,\n plans: payload\n };\n case FETCH_CURRENT_PLAN_SUCCESS:\n return {\n ...state,\n currentPlan: payload\n };\n case REQUEST_CURRENT_PLAN_CHANGE_SUCCESS:\n return {\n ...state,\n currentPlan: payload\n };\n default:\n return state;\n }\n}\n","import { StatusKeys } from \"@models\";\n\nexport const initialProfile = { tin: \"\", pinfl: \"\", name: \"\", status: null as StatusKeys | null };\n","import { createSlice } from \"@reduxjs/toolkit\";\nimport { initialProfile } from \"@utils/constants/Auth\";\n\nconst initialState = {\n profile: initialProfile,\n auth: false,\n};\n\nconst authSlice = createSlice({\n name: \"profile\",\n initialState: initialState,\n reducers: {\n setProfile(state, action) {\n state.profile = action.payload;\n },\n\n setAuth(state, action) {\n state.auth = action.payload;\n },\n },\n});\n\nexport const { reducer: authReducer, actions: authActions } = authSlice;\n\nexport default authReducer;\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\n\n\nconst initialState = {\n isLoading: false,\n}\n\nconst uiSlice = createSlice({\n name: 'ui',\n initialState,\n reducers: {\n setLoading(state, action: PayloadAction) {\n state.isLoading = action.payload;\n }\n }\n})\n\nexport const uiActions = uiSlice.actions;\n\nexport default uiSlice.reducer;","import authReducer from \"./authSlice\";\nimport uiReducer from \"./uiSlice\";\n\nconst reducers = {\n auth: authReducer,\n ui: uiReducer,\n};\n\nexport default reducers;\n","import {\n persistStore,\n persistReducer,\n FLUSH,\n PAUSE,\n PERSIST,\n PURGE,\n REGISTER,\n REHYDRATE,\n} from \"redux-persist\";\nimport storage from \"redux-persist/lib/storage/session\";\nimport autoMergeLevel2 from \"redux-persist/lib/stateReconciler/autoMergeLevel2\";\nimport { combineReducers, configureStore } from \"@reduxjs/toolkit\";\n\nimport * as reducers from \"./reducers\";\nimport reducer from \"./slices\";\n\nconst persistConfig = {\n key: \"root\",\n storage,\n stateReconciler: autoMergeLevel2,\n whitelist: [\"docsTableReducer\", \"profile\"],\n};\n\nconst middleware: any[] = [];\n\nif (process.env.NODE_ENV === 'development') {\n const { createLogger } = require('redux-logger');\n\n const logger = createLogger({\n level: 'info',\n collapsed: true,\n });\n\n middleware.push(logger);\n}\n\nconst rootReducer = combineReducers({ ...reducers, ...reducer });\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\n\nconst store = configureStore({\n reducer: persistedReducer,\n devTools: process.env.NODE_ENV !== \"production\",\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: {\n ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\n },\n }).concat(middleware),\n});\n\nconst persistor = persistStore(store);\n\nexport { rootReducer, store, persistor };\n","import { useEffect } from \"react\";\nimport styled, { keyframes } from \"styled-components\";\n\nconst Loader = () => {\n useEffect(() => {\n document.body.style.overflowY = \"hidden\";\n return () => {\n document.body.style.overflowY = \"unset\";\n };\n }, []);\n\n return (\n \n \n \n
\n
\n
\n
\n );\n};\n\nconst animation = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nconst Spinner = styled.div`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.651);\n z-index: 5000;\n`;\n\nconst SpinnerElipse = styled.div`\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n`;\n\nconst SpinnerShadow = styled.div`\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0;\n\n & div {\n position: absolute;\n animation: ${animation} 1s linear infinite;\n width: 80px;\n height: 80px;\n top: 60px;\n left: 60px;\n border-radius: 50%;\n box-shadow: 0 4.4px 0 0 #5ba6e1;\n transform-origin: 40px 42.2px;\n box-sizing: content-box;\n }\n`;\n\nexport default Loader;\n","import React from \"react\";\nimport { Container, Card } from \"shards-react\";\nexport function KeySelect({ selectedKey, onClick }) {\n let name = \"\";\n if (selectedKey != undefined) {\n name = selectedKey.vo.CN;\n }\n return (\n \n {name}\n \n );\n}\n\nexport function KeyOptions({ options, onClick }) {\n return (\n \n {options.map((key, i) => (\n onClick(key)}>\n

{key.vo.CN}

\n

\n ИНН: {\" \"}\n {key.vo.TIN}\n

\n

\n Оганизация: {\" \"}\n {key.vo.O}\n

\n
\n ))}\n
\n );\n}\nconst styleParagra1 = {\n marginBottom: \"0\",\n color: \"#4a5f6d\",\n fontWeight: \"bolder\",\n display: \"flex\",\n};\nconst styleParagra = {\n marginBottom: \"0\",\n};\nconst cardStyle = {\n width: \"100%\",\n minHeight: \"122px\",\n borderRadius: \"0\",\n cursor: \"pointer\",\n padding: \"10px\",\n fontSize: \"14px\",\n display: \"flex\",\n justifyContent: \"center\",\n};\nconst selectStle = {\n margin: \"0\",\n marginBottom: \"96px\",\n padding: \"10px 24px\",\n border: \"1px solid\",\n borderRadius: \"6px\",\n cursor: \"pointer\",\n minHeight: \"67px\",\n width: \"90%\",\n display: \"flex\",\n alignItems: \"center\",\n maxWidth: \"455px\",\n background: \"#F7FAFC\",\n color: \"rgba(3, 29, 47, 0.7)\",\n};\nconst CardStyleСhoice = {\n maxWidth: \"455px\",\n height: \"244px\",\n width: \"100%\",\n overflow: \"auto\",\n zIndex: \"9999\",\n position: \"relative\",\n top: \"-168px\",\n};\n","import { KeyType } from \"@models/keyTypes\";\nimport { encode, getValue, setValue } from \"@utils/helpers\";\n\nclass User {\n private username = \"NetSigner\";\n private password = \"12345678\";\n\n get credentials() {\n return encode(`${this.username}:${this.password}`);\n }\n\n get token() {\n return sessionStorage.getItem(\"token\") || \"\";\n }\n\n set token(token) {\n sessionStorage.setItem(\"token\", token);\n }\n\n get key(): KeyType {\n return getValue(\"selectedKey\");\n }\n\n set key(key) {\n setValue(\"selectedKey\", key);\n }\n\n get keyId(): string {\n return getValue(\"keyId\");\n }\n\n set keyId(id) {\n setValue(\"keyId\", id);\n }\n}\n\nexport default new User();\n","import { fetchData } from \"@utils/helpers/network\";\nimport axios from \"axios\";\n\ntype CountryType = {\n countryId: string;\n name: string;\n};\n\nclass CommonApi {\n get isDev() {\n return process.env.NODE_ENV === \"development\";\n }\n\n async fetchIp() {\n const response = await axios.get(\"https://api.ipify.org?format=json\");\n return response.data.ip;\n }\n\n async fetchCountries() {\n const response = await fetchData(\"hs/ut/countries\");\n return response;\n }\n}\n\nexport default new CommonApi();\n","import CommonApi from \"@api/CommonApi\";\n\nclass Url {\n private url1c = \"https://l-factura.uz/factura/\";\n private urlGo = 'http://l-factura.uz:3005/factura/'\n\n cors = \"http://127.0.0.1:81/\";\n\n get url() {\n return false ? this.urlGo : this.url1c;\n }\n\n get host() {\n return CommonApi.isDev ? `${this.cors}${this.url}` : this.url;\n }\n}\n\nexport default new Url();\n","import { authActions } from \"@redux/slices/authSlice\";\nimport { store } from \"@redux/store\";\nimport { initialProfile } from \"@utils/constants/Auth\";\nimport Url from \"@utils/constants/Url\";\nimport User from \"@utils/constants/User\";\nimport axios, { AxiosError, Method } from \"axios\";\nimport { clearSlash, handleJsonCorrection } from \"./helpers\";\n\n\n\nconst configuredAxios = async (method: Method, url: string, data?: unknown) => {\n try {\n const response = await axios({\n method,\n url: Url.host + clearSlash(url),\n data,\n headers: {\n Authorization: `Basic ${User.credentials}`,\n Token: User.token,\n },\n });\n\n if (response.status !== 200 && response.status !== 202) {\n throw Error(response.data);\n }\n\n if (typeof response.data === \"string\") {\n const text = response.data.toString();\n\n response.data = handleJsonCorrection(text);\n }\n\n return response;\n } catch (err) {\n const error = err as AxiosError;\n const status = error.response?.status;\n const data = error.response?.data;\n\n if (status === 401) {\n const { dispatch } = store;\n dispatch(authActions.setAuth(false));\n\n User.token = \"_\";\n\n dispatch(authActions.setProfile(initialProfile));\n throw Error(\"Не авторизован\");\n }\n\n const errorMessage = data.errorMessage || data.ErrorMessage\n\n console.dir(error.response)\n\n\n if (errorMessage) throw Error(`soliq.uz: ${errorMessage}`);\n\n const errorDescription = data.errorDescription || data.ErrorDescription\n\n if (errorDescription) throw Error(errorDescription)\n\n throw Error(\"Ошибка при подключении к \" + url + \", получено \" + status);\n }\n\n};\n\nexport const fetchData = async (url: string) => {\n const response = await configuredAxios(\"get\", url);\n\n return response.data as ReturnValue;\n};\n\nexport const fetchDataResponse = async (url: string) => {\n const response = await configuredAxios(\"get\", url);\n\n return response;\n};\n\nexport const postData = async (url: string, body: any) => {\n const { data } = await configuredAxios(\"post\", url, body);\n\n return data as ReturnValue;\n};\n\nexport const postDataResponse = async (url: string, body: any) => {\n const response = await configuredAxios(\"post\", url, body);\n\n return response;\n};\n\nexport const removeData = async (url: string, body: any) => {\n const { data } = await configuredAxios(\"delete\", url, body);\n\n return data;\n};\n","class CAPIWS {\n get URL() {\n const protocol = window.location.protocol.toLowerCase();\n\n return (\n (protocol.toLowerCase() === \"https:\"\n ? \"wss://127.0.0.1:64443\"\n : \"ws://127.0.0.1:64646\") + \"/service/cryptapi\"\n );\n }\n\n callFunction(funcDef, callback, error) {\n if (!WebSocket) if (error) return error();\n\n let socket;\n\n try {\n socket = new WebSocket(this.URL);\n } catch (e) {\n error(e);\n }\n\n handleSocket(socket, callback, error);\n\n socket.onopen = function () {\n socket.send(JSON.stringify(funcDef));\n };\n }\n\n version(callback, error) {\n if (!WebSocket) if (error) return error();\n\n let socket;\n\n try {\n socket = new WebSocket(this.URL);\n } catch (e) {\n error(e);\n }\n\n handleSocket(socket, callback, error);\n\n socket.onopen = function () {\n let o = { name: \"version\" };\n socket.send(JSON.stringify(o));\n };\n }\n\n apidoc(callback, error) {\n if (!WebSocket) if (error) return error();\n\n let socket;\n try {\n socket = new WebSocket(this.URL);\n } catch (e) {\n error(e);\n }\n\n handleSocket(socket, callback, error);\n\n socket.onopen = function () {\n let o = { name: \"apidoc\" };\n socket.send(JSON.stringify(o));\n };\n }\n\n apikey(domainAndKey, callback, error) {\n if (!WebSocket) {\n if (error) error();\n return;\n }\n\n let socket;\n\n try {\n socket = new WebSocket(this.URL);\n } catch (e) {\n error(e);\n }\n\n handleSocket(socket, callback, error);\n\n socket.onopen = function () {\n let o = { name: \"apikey\", arguments: domainAndKey };\n socket.send(JSON.stringify(o));\n };\n }\n}\n\nconst handleSocket = (socket: WebSocket, callback, error) => {\n socket.onerror = (e) => error && error(e);\n socket.onmessage = (e) => {\n const data = JSON.parse(e.data);\n socket.close();\n callback(e, data);\n };\n};\n\nexport default new CAPIWS();\n","/* eslint-disable */\n\nimport { encode } from \"@utils/helpers\";\n\nimport CAPIWS from \"./e-imzo\";\n\nDate.prototype.yyyymmdd = function () {\n var yyyy = this.getFullYear().toString();\n var mm = (this.getMonth() + 1).toString(); // getMonth() is zero-based\n var dd = this.getDate().toString();\n return yyyy + (mm[1] ? mm : \"0\" + mm[0]) + (dd[1] ? dd : \"0\" + dd[0]); // padding\n};\nDate.prototype.ddmmyyyy = function () {\n var yyyy = this.getFullYear().toString();\n var mm = (this.getMonth() + 1).toString(); // getMonth() is zero-based\n var dd = this.getDate().toString();\n return (dd[1] ? dd : \"0\" + dd[0]) + \".\" + (mm[1] ? mm : \"0\" + mm[0]) + \".\" + yyyy; // padding\n};\n\nvar dates = {\n convert: function (d) {\n // Converts the date in d to a date-object. The input can be:\n // a date object: returned without modification\n // an array : Interpreted as [year,month,day]. NOTE: month is 0-11.\n // a number : Interpreted as number of milliseconds\n // since 1 Jan 1970 (a timestamp)\n // a string : Any format supported by the javascript engine, like\n // \"YYYY/MM/DD\", \"MM/DD/YYYY\", \"Jan 31 2009\" etc.\n // an object : Interpreted as an object with year, month and date\n // attributes. **NOTE** month is 0-11.\n return d.constructor === Date\n ? d\n : d.constructor === Array\n ? new Date(d[0], d[1], d[2])\n : d.constructor === Number\n ? new Date(d)\n : d.constructor === String\n ? new Date(d)\n : typeof d === \"object\"\n ? new Date(d.year, d.month, d.date)\n : NaN;\n },\n compare: function (a, b) {\n // Compare two dates (could be of any type supported by the convert\n // function above) and returns:\n // -1 : if a < b\n // 0 : if a = b\n // 1 : if a > b\n // NaN : if a or b is an illegal date\n // NOTE: The code inside isFinite does an assignment (=).\n return isFinite((a = this.convert(a).valueOf())) && isFinite((b = this.convert(b).valueOf()))\n ? (a > b) - (a < b)\n : NaN;\n },\n inRange: function (d, start, end) {\n // Checks if date in d is between dates in start and end.\n // Returns a boolean or NaN:\n // true : if d is between start and end (inclusive)\n // false : if d is before start or after end\n // NaN : if one or more of the dates is illegal.\n // NOTE: The code inside isFinite does an assignment (=).\n return isFinite((d = this.convert(d).valueOf())) &&\n isFinite((start = this.convert(start).valueOf())) &&\n isFinite((end = this.convert(end).valueOf()))\n ? start <= d && d <= end\n : NaN;\n },\n};\nString.prototype.splitKeep = function (splitter, ahead) {\n var self = this;\n var result = [];\n if (splitter != \"\") {\n // Substitution of matched string\n function getSubst(value) {\n var substChar = value[0] == \"0\" ? \"1\" : \"0\";\n var subst = \"\";\n for (var i = 0; i < value.length; i++) {\n subst += substChar;\n }\n return subst;\n }\n var matches = [];\n // Getting mached value and its index\n var replaceName = splitter instanceof RegExp ? \"replace\" : \"replaceAll\";\n var r = self[replaceName](splitter, function (m, i, e) {\n matches.push({ value: m, index: i });\n return getSubst(m);\n });\n // Finds split substrings\n var lastIndex = 0;\n for (var i = 0; i < matches.length; i++) {\n var m = matches[i];\n var nextIndex = ahead == true ? m.index : m.index + m.value.length;\n if (nextIndex != lastIndex) {\n var part = self.substring(lastIndex, nextIndex);\n result.push(part);\n lastIndex = nextIndex;\n }\n }\n if (lastIndex < self.length) {\n var part = self.substring(lastIndex, self.length);\n result.push(part);\n }\n } else {\n result.add(self);\n }\n return result;\n};\n\nexport const EIMZOClient = {\n NEW_API: false,\n API_KEYS: [\n \"localhost\",\n \"96D0C1491615C82B9A54D9989779DF825B690748224C2B04F500F370D51827CE2644D8D4A82C18184D73AB8530BB8ED537269603F61DB0D03D2104ABF789970B\",\n \"127.0.0.1\",\n \"A7BCFA5D490B351BE0754130DF03A068F855DB4333D43921125B9CF2670EF6A40370C646B90401955E1F7BC9CDBF59CE0B2C5467D820BE189C845D0B79CFC96F\",\n \"l-factura.uz\",\n \"AD0B4488C4AFED1E7EB73010A7ACAC33B8BC00FCB931E1DE31A02A5200AA35E39681C50062C0C5AC48CBC6AD3FD6996684CF3960875CF5893DFC580D544C1E66\",\n \"null\",\n \"E0A205EC4E7B78BBB56AFF83A733A1BB9FD39D562E67978CC5E7D73B0951DB1954595A20672A63332535E13CC6EC1E1FC8857BB09E0855D7E76E411B6FA16E9D\",\n ],\n checkVersion: function (success, fail) {\n CAPIWS.version(\n function (event, data) {\n if (data.success === true) {\n if (data.major && data.minor) {\n var installedVersion = parseInt(data.major) * 100 + parseInt(data.minor);\n EIMZOClient.NEW_API = installedVersion >= 336;\n success(data.major, data.minor);\n } else {\n fail(null, \"E-IMZO Version is undefined\");\n }\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n },\n installApiKeys: function (success, fail) {\n CAPIWS.apikey(\n EIMZOClient.API_KEYS,\n function (event, data) {\n if (data.success) {\n success();\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n },\n listAllUserKeys: function (itemIdGen, itemUiGen, success, fail) {\n var items = [];\n var errors = [];\n if (!EIMZOClient.NEW_API) {\n EIMZOClient._findCertKeys(itemIdGen, itemUiGen, items, errors, function (firstItmId) {\n EIMZOClient._findPfxs(itemIdGen, itemUiGen, items, errors, function (firstItmId2) {\n if (items.length === 0 && errors.length > 0) {\n fail(errors[0].e, errors[0].r);\n } else {\n var firstId = null;\n if (items.length === 1) {\n if (firstItmId) {\n firstId = firstItmId;\n } else if (firstItmId2) {\n firstId = firstItmId2;\n }\n }\n success(items, firstId);\n }\n });\n });\n } else {\n EIMZOClient._findCertKeys2(itemIdGen, itemUiGen, items, errors, function (firstItmId) {\n EIMZOClient._findPfxs2(itemIdGen, itemUiGen, items, errors, function (firstItmId2) {\n EIMZOClient._findTokens2(itemIdGen, itemUiGen, items, errors, function (firstItmId3) {\n if (items.length === 0 && errors.length > 0) {\n fail(errors[0].e, errors[0].r);\n } else {\n var firstId = null;\n if (items.length === 1) {\n if (firstItmId) {\n firstId = firstItmId;\n } else if (firstItmId2) {\n firstId = firstItmId2;\n } else if (firstItmId3) {\n firstId = firstItmId3;\n }\n }\n success(items, firstId);\n }\n });\n });\n });\n }\n },\n loadKey: function (itemObject, success, fail) {\n if (itemObject) {\n var vo = itemObject;\n if (vo.type === \"certkey\") {\n CAPIWS.callFunction(\n { plugin: \"certkey\", name: \"load_key\", arguments: [vo.disk, vo.path, vo.name, vo.serialNumber] },\n function (event, data) {\n if (data.success) {\n var id = data.keyId;\n success(id);\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else if (vo.type === \"pfx\") {\n CAPIWS.callFunction(\n { plugin: \"pfx\", name: \"load_key\", arguments: [vo.disk, vo.path, vo.name, vo.alias] },\n function (event, data) {\n if (data.success) {\n var id = data.keyId;\n CAPIWS.callFunction(\n { name: \"verify_password\", plugin: \"pfx\", arguments: [id] },\n function (event, data) {\n if (data.success) {\n success(id);\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else if (vo.type === \"ftjc\") {\n CAPIWS.callFunction(\n { plugin: \"ftjc\", name: \"load_key\", arguments: [vo.cardUID] },\n function (event, data) {\n if (data.success) {\n var id = data.keyId;\n CAPIWS.callFunction(\n { plugin: \"ftjc\", name: \"verify_pin\", arguments: [id, \"1\"] },\n function (event, data) {\n if (data.success) {\n success(id);\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n }\n }\n },\n changeKeyPassword: function (itemObject, success, fail) {\n if (itemObject) {\n var vo = itemObject;\n if (vo.type === \"pfx\") {\n CAPIWS.callFunction(\n { plugin: \"pfx\", name: \"load_key\", arguments: [vo.disk, vo.path, vo.name, vo.alias] },\n function (event, data) {\n if (data.success) {\n var id = data.keyId;\n CAPIWS.callFunction(\n { name: \"change_password\", plugin: \"pfx\", arguments: [id] },\n function (event, data) {\n if (data.success) {\n success();\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else if (vo.type === \"ftjc\") {\n CAPIWS.callFunction(\n { plugin: \"ftjc\", name: \"load_key\", arguments: [vo.cardUID] },\n function (event, data) {\n if (data.success) {\n var id = data.keyId;\n CAPIWS.callFunction(\n { name: \"change_pin\", plugin: \"ftjc\", arguments: [id, \"1\"] },\n function (event, data) {\n if (data.success) {\n success();\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n }\n }\n },\n createPkcs7: function (id, data, timestamper, success, fail) {\n CAPIWS.callFunction(\n { plugin: \"pkcs7\", name: \"create_pkcs7\", arguments: [encode(data), id, \"no\"] },\n function (event, data) {\n if (data.success) {\n var pkcs7 = data.pkcs7_64;\n if (timestamper) {\n var sn = data.signer_serial_number;\n timestamper(\n data.signature_hex,\n function (tst) {\n CAPIWS.callFunction(\n { plugin: \"pkcs7\", name: \"attach_timestamp_token_pkcs7\", arguments: [pkcs7, sn, tst] },\n function (event, data) {\n if (data.success) {\n var pkcs7tst = data.pkcs7_64;\n success(pkcs7tst);\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n },\n fail\n );\n } else {\n success(pkcs7);\n }\n } else {\n fail(null, data.reason);\n }\n },\n function (e) {\n fail(e, null);\n }\n );\n },\n _getX500Val: function (s, f) {\n var res = s.splitKeep(/,[A-Z]+=/g, true);\n for (var i in res) {\n var n = res[i].search((i > 0 ? \",\" : \"\") + f + \"=\");\n if (n !== -1) {\n return res[i].slice(n + f.length + 1 + (i > 0 ? 1 : 0));\n }\n }\n return \"\";\n },\n _findCertKeyCertificates: function (itemIdGen, itemUiGen, items, errors, allDisks, diskIndex, params, callback) {\n if (parseInt(diskIndex) + 1 > allDisks.length) {\n callback(params);\n return;\n }\n CAPIWS.callFunction(\n { plugin: \"certkey\", name: \"list_certificates\", arguments: [allDisks[diskIndex]] },\n function (event, data) {\n if (data.success) {\n for (var rec in data.certificates) {\n var el = data.certificates[rec];\n var vo = {\n disk: el.disk,\n path: el.path,\n name: el.name,\n serialNumber: el.serialNumber,\n subjectName: el.subjectName,\n validFrom: new Date(el.validFrom),\n validTo: new Date(el.validTo),\n issuerName: el.issuerName,\n publicKeyAlgName: el.publicKeyAlgName,\n CN: EIMZOClient._getX500Val(el.subjectName, \"CN\"),\n TIN: EIMZOClient._getX500Val(el.subjectName, \"INITIALS\"),\n O: EIMZOClient._getX500Val(el.subjectName, \"O\"),\n T: EIMZOClient._getX500Val(el.subjectName, \"T\"),\n type: \"certkey\",\n };\n if (!vo.TIN) continue;\n var itmkey = itemIdGen(vo, rec);\n if (params.length === 0) {\n params.push(itmkey);\n }\n var itm = itemUiGen(itmkey, vo);\n items.push(itm);\n }\n } else {\n errors.push({ r: data.reason });\n }\n EIMZOClient._findCertKeyCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n parseInt(diskIndex) + 1,\n params,\n callback\n );\n },\n function (e) {\n errors.push({ e: e });\n EIMZOClient._findCertKeyCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n parseInt(diskIndex) + 1,\n params,\n callback\n );\n }\n );\n },\n _findCertKeys: function (itemIdGen, itemUiGen, items, errors, callback) {\n var allDisks = [];\n CAPIWS.callFunction(\n { plugin: \"certkey\", name: \"list_disks\" },\n function (event, data) {\n if (data.success) {\n for (var rec in data.disks) {\n allDisks.push(data.disks[rec]);\n if (parseInt(rec) + 1 >= data.disks.length) {\n var params = [];\n EIMZOClient._findCertKeyCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n 0,\n params,\n function (params) {\n callback(params[0]);\n }\n );\n }\n }\n } else {\n errors.push({ r: data.reason });\n }\n },\n function (e) {\n errors.push({ e: e });\n callback();\n }\n );\n },\n _findPfxCertificates: function (itemIdGen, itemUiGen, items, errors, allDisks, diskIndex, params, callback) {\n if (parseInt(diskIndex) + 1 > allDisks.length) {\n callback(params);\n return;\n }\n CAPIWS.callFunction(\n { plugin: \"pfx\", name: \"list_certificates\", arguments: [allDisks[diskIndex]] },\n function (event, data) {\n if (data.success) {\n for (var rec in data.certificates) {\n var el = data.certificates[rec];\n var x500name_ex = el.alias.toUpperCase();\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.1=\", \"INN=\");\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.2=\", \"PINFL=\");\n var vo = {\n disk: el.disk,\n path: el.path,\n name: el.name,\n alias: el.alias,\n serialNumber: EIMZOClient._getX500Val(x500name_ex, \"SERIALNUMBER\"),\n validFrom: new Date(\n EIMZOClient._getX500Val(x500name_ex, \"VALIDFROM\").replace(/\\./g, \"-\").replace(\" \", \"T\")\n ),\n validTo: new Date(EIMZOClient._getX500Val(x500name_ex, \"VALIDTO\").replace(/\\./g, \"-\").replace(\" \", \"T\")),\n CN: EIMZOClient._getX500Val(x500name_ex, \"CN\"),\n TIN: EIMZOClient._getX500Val(x500name_ex, \"INN\")\n ? EIMZOClient._getX500Val(x500name_ex, \"INN\")\n : EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n UID: EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n PINFL: EIMZOClient._getX500Val(x500name_ex, \"PINFL\"),\n O: EIMZOClient._getX500Val(x500name_ex, \"O\"),\n T: EIMZOClient._getX500Val(x500name_ex, \"T\"),\n type: \"pfx\",\n };\n if (!vo.TIN && !vo.PINFL) continue;\n var itmkey = itemIdGen(vo, rec);\n if (params.length === 0) {\n params.push(itmkey);\n }\n var itm = itemUiGen(itmkey, vo);\n items.push(itm);\n }\n } else {\n errors.push({ r: data.reason });\n }\n EIMZOClient._findPfxCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n parseInt(diskIndex) + 1,\n params,\n callback\n );\n },\n function (e) {\n errors.push({ e: e });\n EIMZOClient._findPfxCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n parseInt(diskIndex) + 1,\n params,\n callback\n );\n }\n );\n },\n _findPfxs: function (itemIdGen, itemUiGen, items, errors, callback) {\n var allDisks = [];\n CAPIWS.callFunction(\n { plugin: \"pfx\", name: \"list_disks\" },\n function (event, data) {\n if (data.success) {\n var disks = data.disks;\n for (var rec in disks) {\n allDisks.push(data.disks[rec]);\n if (parseInt(rec) + 1 >= data.disks.length) {\n var params = [];\n EIMZOClient._findPfxCertificates(\n itemIdGen,\n itemUiGen,\n items,\n errors,\n allDisks,\n 0,\n params,\n function (params) {\n callback(params[0]);\n }\n );\n }\n }\n } else {\n errors.push({ r: data.reason });\n }\n },\n function (e) {\n errors.push({ e: e });\n callback();\n }\n );\n },\n _findCertKeys2: function (itemIdGen, itemUiGen, items, errors, callback) {\n var itmkey0;\n CAPIWS.callFunction(\n { plugin: \"certkey\", name: \"list_all_certificates\" },\n function (event, data) {\n if (data.success) {\n for (var rec in data.certificates) {\n var el = data.certificates[rec];\n var vo = {\n disk: el.disk,\n path: el.path,\n name: el.name,\n serialNumber: el.serialNumber,\n subjectName: el.subjectName,\n validFrom: new Date(el.validFrom),\n validTo: new Date(el.validTo),\n issuerName: el.issuerName,\n publicKeyAlgName: el.publicKeyAlgName,\n CN: EIMZOClient._getX500Val(el.subjectName, \"CN\"),\n TIN: EIMZOClient._getX500Val(el.subjectName, \"INITIALS\"),\n O: EIMZOClient._getX500Val(el.subjectName, \"O\"),\n T: EIMZOClient._getX500Val(el.subjectName, \"T\"),\n type: \"certkey\",\n };\n if (!vo.TIN) continue;\n var itmkey = itemIdGen(vo, rec);\n if (!itmkey0) {\n itmkey0 = itmkey;\n }\n var itm = itemUiGen(itmkey, vo);\n items.push(itm);\n }\n } else {\n errors.push({ r: data.reason });\n }\n callback(itmkey0);\n },\n function (e) {\n errors.push({ e: e });\n callback(itmkey0);\n }\n );\n },\n _findPfxs2: function (itemIdGen, itemUiGen, items, errors, callback) {\n var itmkey0;\n CAPIWS.callFunction(\n { plugin: \"pfx\", name: \"list_all_certificates\" },\n function (event, data) {\n if (data.success) {\n for (var rec in data.certificates) {\n var el = data.certificates[rec];\n var x500name_ex = el.alias.toUpperCase();\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.1=\", \"INN=\");\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.2=\", \"PINFL=\");\n var vo = {\n disk: el.disk,\n path: el.path,\n name: el.name,\n alias: el.alias,\n serialNumber: EIMZOClient._getX500Val(x500name_ex, \"SERIALNUMBER\"),\n validFrom: new Date(\n EIMZOClient._getX500Val(x500name_ex, \"VALIDFROM\").replace(/\\./g, \"-\").replace(\" \", \"T\")\n ),\n validTo: new Date(EIMZOClient._getX500Val(x500name_ex, \"VALIDTO\").replace(/\\./g, \"-\").replace(\" \", \"T\")),\n CN: EIMZOClient._getX500Val(x500name_ex, \"CN\"),\n TIN: EIMZOClient._getX500Val(x500name_ex, \"INN\")\n ? EIMZOClient._getX500Val(x500name_ex, \"INN\")\n : EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n UID: EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n PINFL: EIMZOClient._getX500Val(x500name_ex, \"PINFL\"),\n O: EIMZOClient._getX500Val(x500name_ex, \"O\"),\n T: EIMZOClient._getX500Val(x500name_ex, \"T\"),\n type: \"pfx\",\n };\n if (!vo.TIN && !vo.PINFL) continue;\n var itmkey = itemIdGen(vo, rec);\n if (!itmkey0) {\n itmkey0 = itmkey;\n }\n var itm = itemUiGen(itmkey, vo);\n items.push(itm);\n }\n } else {\n errors.push({ r: data.reason });\n }\n callback(itmkey0);\n },\n function (e) {\n errors.push({ e: e });\n callback(itmkey0);\n }\n );\n },\n _findTokens2: function (itemIdGen, itemUiGen, items, errors, callback) {\n var itmkey0;\n CAPIWS.callFunction(\n { plugin: \"ftjc\", name: \"list_all_keys\", arguments: [\"\"] },\n function (event, data) {\n if (data.success) {\n for (var rec in data.tokens) {\n var el = data.tokens[rec];\n var x500name_ex = el.info.toUpperCase();\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.1=\", \"INN=\");\n x500name_ex = x500name_ex.replace(\"1.2.860.3.16.1.2=\", \"PINFL=\");\n var vo = {\n cardUID: el.cardUID,\n statusInfo: el.statusInfo,\n ownerName: el.ownerName,\n info: el.info,\n serialNumber: EIMZOClient._getX500Val(x500name_ex, \"SERIALNUMBER\"),\n validFrom: new Date(EIMZOClient._getX500Val(x500name_ex, \"VALIDFROM\")),\n validTo: new Date(EIMZOClient._getX500Val(x500name_ex, \"VALIDTO\")),\n CN: EIMZOClient._getX500Val(x500name_ex, \"CN\"),\n TIN: EIMZOClient._getX500Val(x500name_ex, \"INN\")\n ? EIMZOClient._getX500Val(x500name_ex, \"INN\")\n : EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n UID: EIMZOClient._getX500Val(x500name_ex, \"UID\"),\n O: EIMZOClient._getX500Val(x500name_ex, \"O\"),\n T: EIMZOClient._getX500Val(x500name_ex, \"T\"),\n type: \"ftjc\",\n };\n if (!vo.TIN) continue;\n var itmkey = itemIdGen(vo, rec);\n if (!itmkey0) {\n itmkey0 = itmkey;\n }\n var itm = itemUiGen(itmkey, vo);\n items.push(itm);\n }\n } else {\n errors.push({ r: data.reason });\n }\n callback(itmkey0);\n },\n function (e) {\n errors.push({ e: e });\n callback(itmkey0);\n }\n );\n },\n};\n\nfunction base64Encode(str) {\n // first we use encodeURIComponent to get percent-encoded UTF-8,\n // then we convert the percent encodings into raw bytes which\n // can be fed into btoa.\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {\n return String.fromCharCode(\"0x\" + p1);\n })\n );\n}\n\nfunction base64Decode(str) {\n // Going backwards: from bytestream, to percent-encoding, to original string.\n return decodeURIComponent(\n atob(str)\n .split(\"\")\n .map(function (c) {\n return \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join(\"\")\n );\n}\n","import { toast, ToastOptions, TypeOptions } from \"react-toastify\";\n\nexport function notify(\n message: string,\n type: TypeOptions,\n config?: ToastOptions\n) {\n toast[type](message, config);\n}\n\nexport function notifyError(error: Error) {\n toast[\"error\"](error.message);\n}\n","import { EIMZOClient } from \"@utils/EImzo/e-imzo-client\";\nimport User from \"@utils/constants/User\";\nimport { fetchData } from \"@utils/helpers/network\";\nimport { notify } from \"@utils/helpers/toast\";\n\nconst {\n loadKey,\n checkVersion,\n installApiKeys,\n listAllUserKeys,\n createPkcs7,\n appendPkcs7Attached,\n} = EIMZOClient;\n\nclass EImzo {\n // sign(data) {}\n\n encrypt(data: Doc, isAttached: boolean = false) {\n const newData = typeof data === \"string\" ? data : JSON.stringify(data);\n console.log(newData);\n\n return new Promise<{ signature: string }>((resolve, reject) => {\n const fn = isAttached ? appendPkcs7Attached : createPkcs7;\n\n fn(\n User.keyId,\n newData,\n this.fetchTimestamp,\n (pkcs7) => {\n resolve({ signature: pkcs7 });\n },\n (e, r) => {\n const error = r ? r : e;\n reject(new Error(error));\n }\n );\n });\n }\n\n async fetchTimestamp(hex, callback, fail) {\n try {\n const response = await fetchData<{ data: string; success: boolean }>(\n `/hs/ut/tst?signatureHex=${hex}`\n );\n\n callback(response.data);\n } catch (err) {\n notify(\"Ошибка при получении штампа времени\", \"error\");\n }\n }\n\n loadKey() {\n const response = new Promise((resolve, reject) => {\n const key = User.key;\n loadKey(\n key.vo,\n (id) => {\n User.keyId = id;\n resolve(id);\n },\n (e, r) => {\n notify(`Не удалось загрузить ключ ${key.id}`, \"error\");\n r ? reject(r) : reject(e);\n }\n );\n });\n\n return response;\n }\n\n loadKeys(setSuccess, setKeys) {\n this.checkVersion(setSuccess, setKeys);\n }\n\n private checkVersion(setSuccess, setKeys) {\n checkVersion(\n (major, minor) => {\n var newVersion = 341;\n var installedVersion = parseInt(major) * 100 + parseInt(minor);\n\n if (installedVersion < newVersion)\n notify(\"Необходимо обновить программу E-IMZO\", \"error\");\n else this.installAllKeys(setSuccess, setKeys);\n },\n (e, r) => {\n const id = \"versionError\";\n if (r) handleError(r, id);\n else handleError(e, id);\n setSuccess(true);\n }\n );\n }\n\n private installAllKeys(setSuccess, setKeys) {\n installApiKeys(\n () => {\n listAllUserKeys(\n (e, t) => \"itm-\" + e.serialNumber + \"-\" + t,\n (key, info) => ({ id: key, vo: info }),\n (keysArray, t) => {\n setKeys(keysArray);\n setSuccess(true);\n },\n (e, t) => notify(\"Ошибка подключения к E-IMZO\", \"error\")\n );\n },\n function (e, r) {\n const id = { toastId: \"eimzoConnectError\" };\n if (r) notify(r, \"error\", id);\n else notify(e, \"error\", id);\n }\n );\n }\n}\n\nconst handleError = (error: string, id: string) => {\n notify(error, \"error\", { toastId: id });\n};\n\nexport default new EImzo();\n","import User from \"@utils/constants/User\";\nimport { fetchData, postData, postDataResponse } from \"@utils/helpers/network\";\nimport EImzo from \"./EImzo\";\n\nclass AuthApi {\n async login(signature = null) {\n const data = await postData(\"/hs/m/auth/\", signature);\n\n return data;\n }\n\n async loginResponse(signature: string | null = null) {\n const response = await postDataResponse(\"/hs/m/auth/\", signature);\n\n return response;\n }\n\n async getToken() {\n const token = await fetchData(\"/hs/m/guid\");\n\n User.token = token;\n return token;\n }\n\n async authorize() {\n await EImzo.loadKey();\n const token = await this.getToken();\n const { signature } = await EImzo.encrypt(token);\n const response = await this.loginResponse(signature);\n return response;\n }\n\n async acceptPublicOffer(text: string) {\n const { signature: sign } = await EImzo.encrypt(text);\n const response = await postData(\"/hs/ut/acceptpo/\", { sign });\n\n return response;\n }\n}\n\nexport default new AuthApi();\n","import { createMakeStyles } from \"tss-react\";\n\nconst { makeStyles } = createMakeStyles({ useTheme: () => {} });\n\nexport default makeStyles();\n","import { store } from \"@redux/store\";\nimport {\n TypedUseSelectorHook,\n useSelector as useReduxSelector,\n useDispatch as useReduxDispatch,\n} from \"react-redux\";\nimport { RootState } from \"../models/storeTypes\";\n\nexport const useSelector: TypedUseSelectorHook = useReduxSelector;\nexport const useDispatch = () => useReduxDispatch();\n\n// export const useHookstate = (value: Type) => useState(deepClone(value));\n","import AuthApi from \"@api/Auth\";\nimport { authActions } from \"@redux/slices/authSlice\";\nimport { PublicOfferText } from \"@utils/constants/PublicOffer\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport makeStyles from \"@utils/styles/makeStyles\";\nimport { useState } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button, Card, FormCheckbox } from \"shards-react\";\n\nexport function PublicOffer(props) {\n const { classes } = useStyles();\n const dispatch = useDispatch();\n\n const [accept, setAccept] = useState(false);\n\n const text = props.text ? props.text : PublicOfferText;\n\n const handleAccept = () => {\n AuthApi.acceptPublicOffer(text)\n .then(() => {\n dispatch(authActions.setAuth(true));\n })\n .catch(notifyError);\n };\n\n return (\n
\n \n

\n
ПУБЛИЧНАЯ ОФЕРТА
\n

\n
\n
\n \n
\n
\n
\n setAccept(!accept)}>\n Я принимаю условия оферты\n \n
\n \n Далее\n \n
\n
\n );\n}\n\nconst useStyles = makeStyles(() => ({\n container: {\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n content: {\n marginTop: \"10%\",\n width: \"600px\",\n height: \"60vh\",\n },\n text: {\n resize: \"none\",\n width: \"100%\",\n height: \"100%\",\n textAlign: \"justify\",\n border: \"none\",\n paddingLeft: \"20px\",\n paddingRight: \"20px\",\n },\n}));\n","export const PublicOfferText = `ПУБЛИЧНАЯ ОФЕРТА по оказанию услуг электронного документооборота в информационной системе «L-Factura» г. Ташкент \t«17» декабря 2019 г.\nООО “LAVINA TECH”, (именуемое в дальнейшем «Исполнитель»), в лице директора Сиддиковой М.Р., действующей на основании Устава, с одной стороны, и в соответствии со статьями 358, 367 и 369 Гражданского кодекса Республики Узбекистан, принявшее (акцептовавшее) настоящую Публичную оферту без каких-либо условий, изъятий и оговорок юридическое лицо и/или физическое лицо, занимающиеся предпринимательской деятельностью без образования юридического лица, (именуемый в дальнейшем «Заказчик») с другой стороны, а вместе именуемые «Стороны»,\nзаверяя, что имеют все полномочия заключить Публичную оферту в соответствии с действующим законодательством и учредительными документами каждой из них (либо каждая из Сторон представлена ее надлежащим образом уполномоченным представителем для подписания настоящей Публичной оферты),\nруководствуясь статьями 353-358, 369, 703-708 и другими нормами Гражданского кодекса Республики Узбекистан, законами Республики Узбекистан «Об электронной цифровой подписи» 11.12.2003 г. за № 562-II, «Об электронном документообороте» 29.04.2004 г. за № 611-II и другими актами действующего законодательства в части касающейся оказания услуг по телекоммуникационным каналам связи,\nв целях широкого обеспечения Государственной политики в области электронного документооборота, защиты прав и законных интересов участников электронного документооборота, а также оптимизации процессов по отправке, получению и хранению документов, экономии на почтовых и курьерских расходах,\nпринимая во внимание, что Исполнитель:\n- обладает необходимой информационной системой «L-Factura», принадлежащей ему на праве собственности и иных правах, позволяющей использовать ее для целей настоящей Публичной оферты;\n- интегрирован в установленном порядке с Информационной системой Государственного налогового комитета Республики Узбекистана используя сервис Е-IMZO WS в электронных документах информационной системе «L-Factura»;\nзаключают настоящую Публичную оферту по оказанию услуг на платной основе (далее – «Договор»), содержащую все существенные условия с применением телекоммуникационных каналов связи.\nТЕРМИНЫ И ОПРЕДЕЛЕНИЯ UTC – всемирное координированное время (англ. Coordinated Universal Time, UTC) – стандарт, по которому общество регулирует часы и время.\nАккаунт (аccount), учетная запись – это совокупность данных и реквизитов о Заказчике или Контрагенте.\nАбонентская плата – плата, вносимая Заказчиком, за право пользоваться услугами Заказчика по настоящему Договору.\nДоставка электронного документа – факт и время поступления электронного документа в личный кабинет, либо на адрес электронной почты Заказчика или Контрагента.\nЗакрытый ключ электронной цифровой подписи – последовательность символов, полученная с использованием средств электронной цифровой подписи, известная только подписывающему лицу и предназначенная для создания электронной цифровой подписи в электронном документе.\nИнтернет-провайдер – организация, предоставляю-щая услуги доступа к сети интернет и иные связанные с интернетом услуги.\nКомплект электронных документов – в комплект входит вся подписанная или неподписанная корреспонденция, отправленная Заказчиком любому из своих Контрагентов в течение календарного месяца, расчет оплаты производится по комплектам электронных документов.\nКонтрагент – юридическое или физическое лицо, в том числе индивидуальный предприниматель, с кем у Заказчика установлены партнерские и/или договорные отношения, и кому Заказчик направляет электронные документы, представленные Исполнителю для оказания им услуг по настоящему Договору.\nЛичный кабинет – раздел для зарегистрированных пользователей, в котором находятся все основные инструменты, необходимые для работы с сайтом Исполнителя. После прохождения регистрации, Заказчик становится авторизованным пользователем сайта Исполнителя.\nНеформализованный документ – тип электронных документов в информационной системе «L-Factura», предназначенный для передачи между Заказчиком и Контрагентом, которые нельзя отнести к формализованным документам.\nОператор связи – организация/предприятие, оказывающее услуги связи на основании соответствующей лицензии.\nОткрытый ключ электронной цифровой подписи – последовательность символов, полученная с использованием средств электронной цифровой подписи, соответствующая закрытому ключу электронной цифровой подписи, доступная любому пользователю информационной системы и предназначенная для подтверждения подлинности электронной цифровой подписи в электронном документе.\nОтправление электронного документа – факт и время отправки электронного документа, которое не может быть отменено его отправителем.\nПодтверждение подлинности ЭЦП – на техническом уровне подтверждение положительного результата проверки принадлежности владельцу закрытого ключа ЭЦП и отсутствия искажений информации в электронном документе.\nСертификат ключа ЭЦП – сертификат открытого ключа (сертификат ЭЦП, сертификат ключа подписи, сертификат ключа проверки электронной подписи) — цифровой или бумажный документ, подтверждающий соответствие между открытым ключом и информацией, идентифицирующей владельца ключа. Содержит информацию о владельце ключа, открытом ключе, его назначении и области применения, а также название центра регистрации ключей ЭЦП, выдавшего данный сертификат.\nСистема, информационная система, ИС, сервис, «L-Factura» – совокупность аппаратно-программных средств, торговых знаков, доменных адресов, организационно-юридических документов в электронном, бумажном и ином виде, а также услуг и товаров, используемых/ предоставляемых/связанных с информационной системой электронного документооборота «L-Factura».\nСлужба штампов времени – доверенный сервис, который создаёт штампы времени для того, чтобы подтвердить, что данные существовали на определенный момент времени.\nУчастники электронного документооборота, Участники – Заказчик, Исполнитель и Контрагент, осуществляющие обмен информацией в электронной форме в информационной системе «L-Factura».\nФормализованный документ – электронные документы в информационной системе «L-Factura», имеющие строго фиксированные формы, соответствующие требованиям, рекомендациям, актам законодательства и Государственного налогового комитета Республики Узбекистан с типом «счёт-фактура», «товарная накладная» или «акт приёмки-сдачи работ (услуг)».\nХеш-код – результат обработки данных хеш-функцией. Данный хеш-код используется для проверки целостности данных и их идентификации. В свою очередь, хеш-функция отвечает за преобразование входной последовательности данных произвольного размера в выходную последовательность фиксированного размера – хеш-код.\nЦентр регистрации ключей (ЦРК) – юридическое лицо, прошедшее государственную регистрацию в специально уполномоченном органе и выполняющее функции по созданию и выдаче сертификатов ключей проверки ЭЦП, а также иные функции, предусмотренные Законом Республики Узбекистан «Об электронной цифровой подписи».\nШтамп времени – информация в электронной форме, которая связывает представление данных на текущий момент времени, представляя доказательства существования данных на указанный момент времени. Под представлением данных понимается значение хеш-функции, полученной от электронного документа.\nЭлектронная цифровая подпись (ЭЦП) – подпись в электронном документе, полученная в результате специальных преобразований информации данного электронного документа с использованием закрытого ключа и позволяющая при помощи связанного открытого ключа установить отсутствие искажения информации в электронном документе и идентифицировать владельца закрытого ключа. ЭЦП равнозначна собственноручной подписи в бумажном документе и имеет одинаковую с ним юридическую силу.\nЭлектронный документ – документ, зафиксированный в электронной форме, имеющий все или некоторые реквизиты электронного документа, позволяющие его идентифицировать. Электронный документ приравнивается к документу на бумажном носителе и имеет одинаковую с ним юридическую силу в случае его подписания с помощью закрытых ключей участников электронного документооборота.\nЭлектронный документооборот – совокупность процессов по формированию, приему, отправке и доставке электронных документов через информационную систему «L-Factura» в соответствующих форматах и согласно требованиям Регламента для совершения сделок, осуществления расчетов, обмена официальной и неофициальной переписки.\nИнициатор обмена электронными документами – Заказчик либо Контрагент, который направляет подписанный ЭЦП электронный документ, другой стороне для его подписания.\nТермины и определения, не определенные в Договоре и Регламенте, применяются в значениях, установленных действующим законодательством Республики Узбекистан и в соответствии с их буквальным смыслом и толкованием, исходя из контекста фразы.\nI. ПРЕДМЕТ ДОГОВОРА\n1.1. Исполнитель в рамках настоящего Договора оказывает Заказчику услуги, перечень которых указан по адресу\nhttps://factura.lavina.uz, а Заказчик обязуется оплатить эти услуги в сроки и на условиях, изложенных в настоящем Договоре.\n1.2. Технический порядок отправки, получения и хранения электронных документов установлен в Регламенте.\n1.3. Территория использования информационной системы «L-Factura»: Республика Узбекистан.\nII. ОСОБЫЕ УСЛОВИЯ\n2.1. Настоящим Заказчик подтверждает, что Исполнитель не несет ответственности за любые финансовые, юридические (правовые) и другие последствия, прямо или косвенно вытекающие из:\n- взаимоотношений Заказчика и Контрагента посредством обмена электронными документами через Исполнителя, в том числе касательно купли-продажи товаров (работ, услуг), осуществляемых в соответствии с договорами (соглашениями), заключаемыми между Заказчиком и Контрагентом;\n- действий Заказчика, совершаемых при подписании им электронных документов и иных действий с использованием своих ключей ЭЦП;\n- содержания передаваемых Заказчиком электронных документов.\n2.2. Настоящим Заказчик подтверждает, что Исполнитель не несет ответственности за любые финансовые убытки, прямо или косвенно понесенные Заказчиком вследствие:\n2.3. Ввиду того, что Исполнитель не вправе:\n- контролировать и/или проверять достоверность передаваемых, получаемых и хранимых электронных документов Заказчика, а также их соответствие законодательству;\n- изменять содержание электронных документов.\nв связи с чем настоящим Заказчик подтверждает, что сам несет ответственность перед Контрагентом или другими уполномоченными органами и финансовыми институтами (организациями) за достоверность и правильность данных в электронных документах, представленных Исполнителю для передачи Контрагентам.\n2.4. Для целей реализации настоящей Публичной оферты, Заказчик не вправе ни при каких условиях:\n- распространять и отправлять информацию, направленную на подрыв государственного, конституционного и общественного строя, нарушение территориальной целостности, политической независимости и государственного суверенитета Республики Узбекистан и иных государств, пропаганду войны, терроризма, насилия, национальной исключительности и религиозной ненависти, расизма и его разновидностей (антисемитизм, фашизм), порочащую, честь и достоинство граждан Республики Узбекистан, вмешательство в их личную жизнь, материалы порнографического содержания, а также совершение других действий, влекущих за собой уголовную ответственность;\n- отправлять любую информацию, содержащую компьютерные вирусы или другие компоненты, приравненные к ним;\n- отправлять материалы, полностью или частично защищенные авторскими или другими правами, без разрешения владельца интеллектуальной собственности.\n2.5. Заказчику предоставляется дисковое пространство в информационной системе «L-Factura» общим размером 2 гигабайта (далее – «Гб»), включающим в себя подписанные документы, черновики и документы, удаленные и перемещенные в «корзину».\nПри этом, если суммарный размер всех файлов превысит 2 Гб, Система начнет в автоматическом режиме удалять файлы, начиная с находящихся в «корзине», а также самых старых, даже если они были загружены менее, чем за год. Об удалении файлов Система заранее оповестит Заказчика и вышлет список файлов, предполагаемых для удаления.\n2.6. Система начнет в автоматическом режиме удалять файлы, которые загружены или созданы более 1-го года назад, об удалении файлов система заранее оповестит и вышлет список файлов, предполагаемых для удаления.\n2.7. Размер файла отдельного электронного документа, созданного в системе или загруженного любым путем ограничивается 15 мегабайтами.\n2.8. В случае необходимости Стороны прямо предусматривают право каждой из Сторон на размещение товарных знаков (логотипов) или любых других обозначений другой Стороны на своих интернет-сайтах.\nIII. АКЦЕПТ ДОГОВОРА\n3.1. Публикация (размещение) текста настоящего Договора на сайте Исполнителя по адресу: https://www.L-Factura/oferta-ru/, является публичным предложением (офертой) Исполнителя, адресованным неопределенному кругу юридических лиц, либо индивидуальным предпринимателям без образования юридического лица, акцептовать настоящую Публичную оферту (заключить договор).\n3.2. Заключение (акцепт) настоящего Договора производится путем присоединения Заказчика к ней, т.е. посредством принятия (акцепта) им условий настоящего Договора в целом, безоговорочно и полностью, без каких-либо условий, изъятий и оговорок.\n3.3. На основании того, что настоящая оферта является публичной в соответствии с действующим гражданским законодательством, Стороны признают безусловным принятием (акцептом) условий оферты факт заполнения регистрационной формы на странице сервиса Исполнителя https://L-Factura/account/register и подписание оферты с помощью сертификата ключа ЭЦП Заказчика.\n3.4. Руководствуясь Законом Республики Узбекистан «Об электронном документообороте»,\nСтороны соглашаются и приравнивают настоящий Договор к документу (договору) на бумажном носителе и подтверждают одинаковую с ним юридическую силу.\nIV. ПРАВА И ОБЯЗАННОСТИ СТОРОН\n4.1. Стороны имеют права и несут обязанности в соответствии с законодательством Республики Узбекистан, настоящим Договором и его приложением. В частности, Исполнитель вправе отказать Заказчику в подключении/использовании Системы без объяснения причин в случае, если:\n- у Исполнителя имеются подозрения, что присоединение к Договору осуществляется в целях легализации доходов, полученных от преступной деятельности, и финансированию терроризма;\n- а также по иным причинам, предусмотренным законодательством Республики Узбекистан, настоящим Договором и Регламентом.\n4.2. В частности, Заказчик вправе после акцепта Договора:\n- иметь копию электронного документа на бумажном носителе. Копия электронного документа на бумажном носителе заверяется и хранится в порядке, установленном законодательством;\n- требовать от Исполнителя предоставления услуг в соответствии с условиями настоящего Договора;\n- получать от Исполнителя консультации по вопросам, связанным с обменом электронных документов в информационной системе «L-Factura»:\nпо «горячей линии» по телефону в Ташкенте +998 71 202-32-82 или по короткому номеру 1198;\nпо электронной почте: servis@soliq.uz;\nв офисе Исполнителя;\nпо письменному запросу.\n4.3. В частности, Заказчик обязуется после акцепта Договора:\n- пополнять баланс до 1 (первого) числа календарного месяца на сумму не меньше установленной платы в соответствии с тарифами услуг Исполнителя, указанными по адресу:\nhttps://factura.lavina.uz;\n- регулярно (не реже одного раза в неделю) самостоятельно или через доверенных лиц знакомиться с информацией об условиях оказания услуг электронного документооборота в информационной системе «L-Factura» на сайте Исполнителя. Несвоевременное ознакомление Заказчика с изменениями/дополнениями, внесенными в Договор и/или Регламент и/или тарифы Исполнителя, не является основанием для их неприменения Исполнителем;\n- в 10 (десяти) дневный срок в электронной форме информировать Исполнителя об изменениях реквизитов и/или юридического адреса, и одновременно, внести изменения данных в личном кабинете Заказчика. В противном случае Исполнитель не несет ответственности за невнесение изменений в реквизиты и/или юридический адрес;\n- самостоятельно в установленном законодательством порядке с использованием средств ЭЦП осуществлять проверку действительности сертификата ключа ЭЦП;\n- обеспечивать хранение в установленном порядке электронных документов;\n- соблюдать действующее законодательство Республики Узбекистан, а также условия Договора и Регламента.\n4.4. В частности, Исполнитель вправе в случае акцепта Заказчиком Договора:\n4.4.1 временно прекратить оказывать услуги Заказчику без возврата денежных средств в следующих случаях:\nа) просрочки денежных обязательств Заказчика по настоящему Договору;\nб) действий Заказчика, направленных на ограничение или препятствование в доступе других Заказчиков (пользователей) в информационной системе «L-Factura», а также осуществления попыток несанкционированного доступа к ресурсам Исполнителя;\nв) в случаях, оговоренных в пункте 2.4. настоящего Договора.\n4.4.2. отказать в оказании услуг без объяснения из-за технических, организационных, юридических или иных причин;\n4.4.3. сканировать поступающие документы на предмет отсутствия вредоносных программ, вирусов или другой запрещенной информации;\n4.4.4. сохранять Интернет адреса, по которым Участники осуществляют доступ к сервисам\nСистемы, сохранять сессионную информацию (cookies) на браузерах и других платформах доступа к Системе для идентификации пользователей;\n4.4.5. проводить любые другие защитные меры для обеспечения бесперебойной работы системы «L-Factura»;\n4.4.6. приостановить действие настоящего Договора полностью или в части до устранения причин, вызвавших его приостановление, предварительно известив Заказчика, если Заказчик не выполняет либо ненадлежащее исполняет свои обязательства по настоящему Договору;\n4.4.7. в одностороннем (внесудебном) порядке отказаться от исполнения Договора частично в следующих случаях:\n- в случае не оплаты услуги Исполнителя в соответствии с тарифами Исполнитель ограничивает Заказчика в использовании системы «L-Factura», предоставляя Заказчику только право пользования ограниченным режимом просмотра электронных документов в течение 1 (одного) календарного месяца;\n- в случае не оплаты услуги Исполнителя в соответствии с тарифами более 1 (одного) календарного месяца Исполнитель вправе блокировать вход в личный кабинет Заказчика;\n- в случае не оплаты услуги Исполнителя в соответствии с тарифами в течение 3 (трех) календарных месяцев подряд Исполнитель имеет право в одностороннем (внесудебном) порядке отказаться от исполнения договорных обязательств (расторгнуть договор), с последующим закрытием доступа к личному кабинету и удалением всех имеющихся электронных документов. В случае одностороннего отказа от исполнения, договорные отношения считаются расторгнутыми. Моментом расторжения Исполнителем настоящего Договора и прекращения оказания услуг считается закрытие доступа к личному кабинету.\n4.5. После акцепта Заказчиком Договора Исполнитель обязан:\n- обеспечивать хранение электронных документов в соответствии с законодательством, в случае если данная услуга Исполнителя была выбрана Заказчиком;\n- обеспечить круглосуточное и бесперебойное функционирование и работоспособность информационной системы «L-Factura», за исключением случаев необходимых перерывов на профилактику и устранение ошибок;\n- предоставлять Заказчику Акты приема-сдачи оказанных услуг до 5-го числа месяца, следующего за отчетным в электронной форме. Заказчик, в случае отсутствия замечаний, осуществляет приемку услуг либо направляет мотивированный отказ от приемки оказанных Исполнителем Услуг. По истечении указанного срока, то есть в течении 5 ти календарных дней со дня предоставления Акта приёма-сдачи если Заказчик не предъявил Исполнителю мотивированный отказ от приемки Услуг, услуги считаются оказанными, принятыми и подлежащими к оплате, в соответствии с условиями настоящего Договора.\n4.6. Услуги по настоящему Договору считаются исполненными Исполнителем с момента подписания Акта приема-сдачи оказанных услуг посредством ЭЦП и выставление счет-фактуры.\nПодписание Заказчиком Акта приема-сдачи оказанных услуг лишает его права предъявлять Исполнителю претензии по оказанным услугам Исполнителя.\nV. ЦЕНА И ПОРЯДОК РАСЧЕТОВ\n5.1. Заказчик оплачивает услуги Исполнителя в соответствии с расценками, указанными по адресу:\nhttps://L-Factura/faktura/ru/pages/rates из расчета предполагаемого объема и вида оказываемых услуг.\n5.2. Оплата услуг Исполнителя осуществляется в национальной валюте Республики Узбекистан «сум» (без НДС) посредством перечисления денежной суммы на расчетный счет Исполнителя.\nВ случае, если оплата услуг Исполнителя приходится на выходные или праздничные (нерабочие дни), оплата услуг Исполнителя осуществляется в первый рабочий день после выходных или праздничных (нерабочих) дней.\n5.3. Датой оплаты считается день списания денежных средств с баланса Заказчика.\n5.4. В случае невозможности оказания услуг непосредственно по вине Исполнителя, Исполнитель\nобязуется произвести возврат денежных средств, имеющихся на балансе.\n5.4.1. Заказчик самостоятельно несет ответственность за правильность производимых им платежей. При изменении платёжных реквизитов Исполнителя, с момента опубликования новых реквизитов на сайте Исполнителя либо направления соответствующего уведомления в электронной форме в личный кабинет или по адресу электронной почты Заказчика, Заказчик самостоятельно несет ответственность за платежи, произведенные по устаревшим реквизитам.\n5.5. Оплата за оказанные услуги осуществляется в следующем порядке:\n- ежемесячная плата услуг Исполнителя, указанная на сайте https://L-Factura/faktura/ru/pages/rates, оплачивается Заказчиком до 1 числа каждого календарного месяца;\n- остальные возмездные услуги согласно тарифам Исполнителя оплачиваются Заказчиком на основании 100 процентной предоплаты.\n5.6. Оплата возмездных услуг осуществляется путем самостоятельного списания Исполнителем денежных средств с баланса без дальнейшего указания/подтверждения Заказчика, на что последний дает свое безоговорочное и не отзывное право Исполнителю в течение всего срока действия настоящего Договора.\nVI. ОТВЕТСТВЕННОСТЬ СТОРОН\n6.1. Стороны несут ответственность за неисполнение или ненадлежащее исполнение обязанностей по настоящей Публичной оферте после ее акцепта в соответствии с действующим законодательством Республики Узбекистан и Законом Республики Узбекистан «О договорно-правовой базе деятельности хозяйствующих субъектов».\n6.2. Уплата неустойки и применение иных мер ответственности за неисполнение обязательств не освобождает стороны от исполнения договорных обязательств и устранения нарушений прав другой стороны.\n6.3. Исполнитель не несет ответственность за неисполнение или ненадлежащее исполнение обязанностей по настоящему Договору:\n- из-за плохого качества услуг связи, находящихся под контролем Интернет-провайдера и/или оператора связи;\n- в случае технического сбоя информационной системы. В этом случае, Исполнитель обязуется незамедлительно информировать Заказчика об этом посредством электронной связи (сообщение электронной почты, SMS или др.).\nVII. ФОРС - МАЖОР\n7.1. К форс-мажорным обстоятельствам относятся следующие: чрезвычайные, непредотвратимые и непредвиденные при данных условиях обстоятельства, вызванные природными явлениями (землетрясения, оползни, ураганы, засухи и другие, не перечисленные стихийные бедствия, не предусмотренные договором страхования) или социально-экономическими обстоятельствами (военные действия, забастовки, блокады, ограничительные и запретные меры государственных организаций и между государствами, а также решения правительства и прочее), а также отключение электроэнергии, принятие решений органов государственной власти и другие обстоятельства, делающие невозможным исполнение обязательств, предусмотренных Договором.\n7.1.1. Отсутствие или нехватка денежных средств не является форс-мажорными обстоятельствами.\n7.2. По возникновении любого Форс-мажорного обстоятельства Сторона, чье выполнение какого-либо обязательства (за исключением обязательства о денежной выплате) по настоящему Договора затрагивается таким обстоятельством Форс-мажора («Пострадавшая Сторона») в течение 3 (трех) календарных дней уведомит другую Сторону в электронной форме о существовании форс-мажорных обстоятельств («Уведомление о Форс-мажоре») с подтверждением государственных или иных компетентных органов о наличии форс-мажорных обстоятельств.\n7.3. Если Стороны не придут к соглашению по поводу взаимоприемлемых мер в течении 30 (тридцати) календарных дней со Дня вручения уведомления о Форс-мажоре, каждая из Сторон может расторгнуть договорные обязательства.\n7.4. Уведомление может быть направлено в электронной форме в личный кабинет или по адресу электронной почты Сторон.\nVIII. КОНФИДЕНЦИАЛЬНОСТЬ\n8.1. Стороны обмениваются необходимой информацией для выполнения своих обязательств по настоящей Публичной оферте. Вся электронная информация, относящаяся к выполнению обязательств по настоящей Публичной оферте, предоставляемая одной стороной другой стороне, в отношении которой законами предусмотрен режим ограниченного доступа, либо информация, о которой Сторона, передающая информацию, уведомила другую Сторону явным образом, что такая информация является конфиденциальной, будет считаться и настоящим определяться как конфиденциальная информация («Конфиденциальная информация»).\nК Конфиденциальной информации относятся, в том числе, персональные данные и сведения, составляющие коммерческую, профессиональную, служебную, банковскую, а также иные виды тайн, определенные законодательством, бухгалтерские и финансовые данные, информация о проведении платежных операций, управляющая информация для настройки информационных, телекоммуникационных и платежных систем.\n8.2. Сторона, получающая Конфиденциальную информацию в соответствии с настоящей Публичной офертой («Получающая сторона») без предварительного получения письменного согласия стороны, предоставляющей такую информацию («Передающая сторона»), не будет:\n- использовать какую-либо часть Конфиденциальной информации для целей, не предусмотренных настоящей Публичной офертой;\n- предоставлять Конфиденциальную информацию или ее часть каким-либо третьим лицам или организациям, за исключением случаев предоставления подобной информации государственным, правоохранительным или иным органам в случаях, оговоренных законодательством Республики Узбекистан;\n- не допускать неправомерного использования Конфиденциальной информации.\n8.3. Получающая сторона не будет нести ответственность за разглашение Конфиденциальной информации или ее части, если она сможет доказать, что такая Конфиденциальная информация:\n- являлась всеобщим достоянием во время ее получения или стала таковой впоследствии не по вине Получающей стороны;\n- была известна Получающей стороне или находилась в ее распоряжении до ее получения;\n- стала известна Получающей стороне из источника, не являющегося Передающей Стороной, при отсутствии нарушения обязательств по обеспечению сохранности Конфиденциальной информации.\n8.4. Конфиденциальная информация остается собственностью Передающей стороны.\n8.5. Не является нарушением конфиденциальности предоставление конфиденциальной информации по законному требованию правоохранительных и иных уполномоченных государственных органов и должностных лиц в случаях и в порядке, предусмотренных применимым законодательством.\n8.6. Получающая сторона несет ответственность за разглашение конфиденциальной информации, а также за ее несанкционированное использование в нарушение условий Публичной оферты, за исключением случаев раскрытия Конфиденциальной информации, предусмотренных пунктами 8.2., 8.3. и 8.5., в виде возмещения Передающей стороне причиненных ей убытков. При этом, убытки не могут включать в себя упущенную выгоду.\nIX. ПОРЯДОК РАЗРЕШЕНИЯ СПОРОВ\n9.1. Споры и разногласия, которые могут возникнуть при исполнении договорных отношений, будут разрешаться путем переговоров между Сторонами.\n9.2. В случае невозможности разрешения споров путем переговоров Стороны, после реализации предусмотренной законодательством процедуры досудебного урегулирования разногласий, передают их на рассмотрение в Экономические суды.\nX. СРОК ДЕЙСТВИЯ, ИЗМЕНЕНИЕ И ПРЕКРАЩЕНИЕ ДОГОВОРА\n10.1. Договор вступает в силу после совершения Заказчиком акцепта в порядке, оговоренном в пункте 3.3, и действует до момента его прекращения. При этом обязательства Исполнителя по настоящему Договору возникают с момента осуществления Заказчиком оплаты услуг Исполнителя (встречное обязательство, предшествующее обязательству Исполнителя по надлежащему и своевременному оказанию услуг по настоящему Договору).\n10.2. Исполнитель вправе в любой момент в одностороннем порядке дополнять и/или изменять условия настоящего Договора и/или, Регламента и/или стоимости оказываемых услуг, размещенных на сайте Исполнителя, о чем Исполнитель извещает Заказчика не менее чем за 5 (пять) календарных дней до даты планируемого дополнения и/или изменения\nс соблюдением обязательной процедуры общедоступной публикации информации, в том числе путем направления соответствующего уведомления в электронной форме в личный кабинет или на электронную почту Заказчика либо через публикацию изменений на сайте Исполнителя.\nПри этом если в течение 5 (пяти) календарных дней с даты получения извещения Исполнитель не получит письменный отказ Заказчика от принятия таких изменений/дополнений и/или Заказчик продолжает пользоваться услугами Исполнителя и/или производит оплату услуг Исполнителя на измененных условиях и/или не использует свои права согласно пункту 10.4. Договора, то это означает согласие Заказчика с указанными изменениями/дополнениями.\n10.2.1. Изменения и/или дополнения, вносимые в условия Договора и приложений к ней в связи с изменением законодательного и нормативного регулирования, вступают в силу одновременно с вступлением в силу изменений в указанных актах.\n10.3. Исполнитель имеет право в одностороннем (внесудебном) порядке отказаться от исполнения договорных обязательств (расторгнуть договор) в случае, если неисполнения или ненадлежащего исполнения Заказчиком своих договорных обязанностей либо не осуществления электронного документооборота Заказчиком в течение 3-х месяцев (неактивности) в Системе, с последующим закрытием доступа к личному кабинету и удалением всех имеющихся электронных документов. В случае одностороннего отказа от исполнения, договорные отношения считаются расторгнутыми. Моментом расторжения Исполнителем настоящего Договора и прекращения оказания услуг считается закрытие доступа к личному кабинету.\n10.3.1. В случае расторжения настоящего Договора в соответствии с пунктом 10.3. денежные средства, находящиеся на балансе, Заказчику не возвращаются и считаются штрафом.\n10.4. Заказчик имеет право в одностороннем (внесудебном) порядке отказаться от исполнения договорных обязательств (расторгнуть договор) путем деактивации своего аккаунта в личном кабинете. В случае одностороннего отказа от исполнения, Договор считается расторгнутым. Моментом расторжения и прекращения оказания услуг считается деактивация аккаунта.\n10.4.1. В случае расторжения настоящего Договора в соответствии с пунктом 10.4. Договора денежные средства, находящиеся на балансовом счете, возвращаются на расчетный счет Заказчика в течение 10 (десяти) календарных дней с удержанием суммы оказанных услуг до момента расторжения договора.\n10.5. В период технического сбоя информационной системы Исполнителя, Стороны производят обмен документами на бумажном носителе с подписанием собственноручной подписью.\nXI. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ\n11.1. Стороны безоговорочно соглашаются с тем, что порядок предоставления услуг в рамках настоящего Договора, а также иные требования и условия, связанные с оказанием или возможностью оказания Услуг, при условии, если это прямо не оговорено в настоящем Договоре, регламентируется законодательством Республики Узбекистан.\n11.2. Заказчик не имеет права передавать свои права и обязанности по настоящему Договору третьей стороне без согласия Исполнителя.\nДля использования системы другими доверенными лицами от имени Заказчика, Заказчик обязан в Настройках системы указать доверенное лицо или убрать.\n11.3. Заключая настоящий Договор, Заказчик свидетельствует о своем ознакомлении с условиями и требованиями его Приложений, и подтверждает, что полностью согласен с ними.\n11.4. По всем вопросам, не урегулированном в настоящем Договоре, Стороны руководствуются действующим законодательством Республики Узбекистана.\n11.5. Если какое-либо из условий Договора признано недействительным или неисполнимым, либо не может вступить в силу в соответствии с действующим законодательством Республики Узбекистан, такое положение Договора будет заменено новым положением, максимально отвечающим изначальным намерениям, содержавшимся в ней. При этом остальные положения настоящего Договора не меняются и остаются в силе.\n11.6. Настоящий Договор разработан и заключается на русском языке. Перевод текста на узбекский язык выполнен экспертами информационной системы «L-Factura» и носит информационный характер. При возникновении неясностей и противоречий следует обращаться к тексту на русском языке.\nПРИЛОЖЕНИЕ №1\nк Публичной оферте по оказанию услуг электронного документооборота в Информационной системе «L-Factura» от «17» декабря 2019 г.\nРЕГЛАМЕНТ\nинформационной системы электронного документооборота «L-Factura»\nI. ОБЩИЕ ПОЛОЖЕНИЯ\n1.1. Настоящий Регламент системы электронного документооборота в информационной системе «L-Factura» (далее – «Регламент») определяет порядок отправки, получения и хранения электронных документов между участниками электронного документооборота в информационной системе (ИС) «L-Factura», а также условия использования информационной системы «L-Factura».\n1.2. Регламент становится обязательным для Заказчика, и он признает юридическую значимость электронных документов, отправленных и полученных через ИС «L-Factura» с момента принятия (акцепта) им условий Публичной оферты.\nXII. РЕКВИЗИТЫ И АДРЕС ИСПОЛНИТЕЛЯ\nГУП «Налог-сервис» при ГНК РУз.\nЮридический адрес: г.Ташкент, ул. Абай, дом 4\nр/с 20210000303768814030, г.Ташкент, ЧЭКИ \"INVEST FINANCE BANK\" АТ, МФО-01041;\nИНН: 202530465.\nТел.: (998) 71 202-32-82 или короткий номер 1198\nЭл.почта: Servis@soliq.uz\n1.3. Заказчик принимает все условия Регламента без каких-либо условий, изъятий и оговорок.\nII. ЭЛЕКТРОННЫЙ ДОКУМЕНТООБОРОТ\n2.1. ИС «L-Factura» обеспечивает обмен электронными документами между участниками электронного документооборота, как приведено в пункте 1.1. Договора.\n2.2. При обмене электронными документами в ИС «L-Factura», соблюдается действующее законодательство Узбекистана в области электронного документооборота и ЭЦП, архивного хранения и других связанных правоотношений.\n2.3. ИС «L-Factura» позволяет обмениваться любыми типами формализованных и неформализованных электронных документов с обеспечением их юридической значимости согласно действующему законодательству Республики Узбекистан и с учетом ограничений на размеры электронных файлов согласно п. 2.5. Договора.\nIII. ЭЛЕКТРОННАЯ ЦИФРОВАЯ ПОДПИСЬ\n3.1. Условия признания электронных документов, подписанных ЭЦП, равнозначна документам на бумажном носителе, подписанным собственноручной подписью, соответствуют статье 7 Закона Республики Узбекистан «Об электронной цифровой подписи», если:\n- подтверждена подлинность ЭЦП;\n- сертификат ключа ЭЦП действует на момент подтверждения подлинности ЭЦП либо на момент подписания электронного документа при наличии доказательств, определяющих момент подписания;\n- ЭЦП используется в целях, указанных в сертификате ключа ЭЦП.\n3.2. ЭЦП документа в ИС «L-Factura» хранится отдельно от электронного документа.\n3.3. Заказчик самостоятельно обеспечивает сохранность и конфиденциальность своих закрытых (секретных) ключей. При этом ни сама Система «L-Factura», ни ее партнеры не будут запрашивать предоставление или загрузку в систему закрытых (секретных) ключей Заказчика или Контрагентов.\nIV. ЦЕНТРЫ РЕГИСТРАЦИИ\n4.1. Для подписания электронного документа Заказчик может использовать действующие закрытые ключи, выданные Центрами регистрации, которые удовлетворяют следующим условиям:\n- прошедшее государственную регистрацию в специально уполномоченном органе и выполняющее функции, предусмотренные Законом Республики Узбекистан «Об электронной цифровой подписи»;\n- интегрированные с системой «L-Factura».\n4.2. Отношения между Центром регистрации и Заказчиком осуществляются на договорной основе.\n4.3. Сертификат Заказчика не должен содержать ограничений по его использованию в электронном документообороте в ИС «L-Factura».\n4.4. Порядок регистрации сертификата ключа ЭЦП в системе «L-Factura» устанавливается самой системой, а также актами законодательства Республики Узбекистан, регулирующими электронный документооборот.\nV. ПРАВИЛА РАБОТЫ В ИНФОРМАЦИОННОЙ СИСТЕМЕ «L-Factura»\n5.1. Заказчик самостоятельно определяет перечень своих Контрагентов в ИС «L-Factura», с которыми он будет обмениваться электронными документами. Для этого Заказчик должен использовать функционал ИС «L-Factura» по приглашению и авторизации Контрагентов.\n5.2. В соответствии с действующим законодательством Республики Узбекистан, Заказчик обязан самостоятельно осуществлять мониторинг поступивших электронных документов в ИС «L-Factura» и знакомиться с содержимым электронных документов, полученных от других Заказчиков/Контрагентов.\n5.3. Заказчик доверяет службе штампов времени ИС «L-Factura» и сформированным данной службой штампам времени.\n5.4. При передаче электронных документов между Участниками в ИС «L-Factura» отправка извещений происходит автоматически.\n5.5. Обмен документов в ИС «L-Factura» осуществляется в строгом соответствии с требованиями налогового законодательства Республики Узбекистан.\n5.6. ИС «L-Factura» автоматически проверяет соответствие файла формализованного электронного документа установленному формату, в соответствии с типом электронного документа.\n5.7. Время отправки электронного документа фиксируется в подтверждении ИС «L-Factura» по стандарту всемирного координированного времени для г. Ташкента: UTC+05:00.\n5.8. В штампах времени, формируемых службой штампов времени ИС «L-Factura», время приводится по стандарту всемирного координированного времени для г. Ташкента: UTC+05:00.\nVI. ОБЩИЕ ТРЕБОВАНИЯ К ПОДГОТОВКЕ ДОКУМЕНТОВ В ЭЛЕКТРОННОЙ ФОРМЕ И ДРУГИМ ТИПОВЫМ ФОРМАМ\n6.1. Документы в электронном виде оформляются посредством согласования условий соответствующих контрактов, заключенных на предоставление различных услуг, работ и/или товаров между Заказчиком и Контрагентом(ами), возможно, посредством их обмена через ИС «L-Factura».\n6.2. При формировании электронных документов по соглашению между Заказчиком и Контрагентом могут использоваться любые общепринятые виды документов – письмо, уведомление, сообщение, учетная запись, оферта, акцепт, договор, соглашение, протокол и др., – в форме электронного файла.\n6.3. Документы в электронном виде и иные формы электронных документов, связанные с оформлением должны соответствовать по содержанию и форме требованиям, установленным Гражданским кодексом Республики Узбекистан, законами Республики Узбекистан «О договорно-правовой базе деятельности хозяйствующих субъектов», «Об электронном документообороте» и иными нормативно-правовыми актами.\n6.4. ЭЦП в электронном документе может функционально совмещаться с процедурами защиты электронного документа, обеспечивающими шифрование, сокрытие, сжатие, целостность, достоверность и неизменность информации перед другой стороной или третьими лицами.\nVII. ПОРЯДОК ХРАНЕНИЯ ДАННЫХ И ПРЕДОСТАВЛЕНИЯ ДОСТУПА К ДАННЫМ ЗАКАЗЧИКА\n7.1. После оформления и подписания электронных документов, ИС «L-Factura» переводит их в режим архивного хранения, без права изменения электронного документа Участниками электронного документооборота.\n7.2. К архивированным электронным документам в ИС «L-Factura» обеспечивается доступ через сеть Интернет, как к документам, имеющим\nюридическую силу и на которые, в случае возникновения спора, Заказчик либо Контрагент может ссылаться.\n7.3. Для каждого подписанного всеми соответствующими Сторонами электронного документа Участникам будет отправлена уникальная ссылка на электронный архив в ИС «L-Factura», содержащий сам электронный документ, протокол действий Участников электронного документооборота, а также сертификаты ключей ЭЦП участников для проверки контролирующими и фискальными органами.\n7.4. Заказчик может в одностороннем порядке удалить подписанный всеми Сторонами электронный документ из архива Сервиса, но Контрагенты будут все еще иметь доступ к данному документу из своего личного кабинета.\n7.5. Протокол действия участников электронного документооборота может включать в себя:\n- полное наименование юридического лица с указанием его организационно-правовой формы или Ф.И.О. индивидуального предпринимателя, а также данные патента;\n- местонахождение и сведения о государственной регистрации юридического лица/индивидуального предпринимателя, идентификационный номер налогоплательщика, электронный адрес, почтовый адрес и телефон, доменное имя сайта;\n- банковские реквизиты;\n- иные сведения, необходимые для оформления и совершения электронного документооборота в ИС «L-Factura»;\n- регистрационный номер сертификата ключа ЭЦП, даты начала и окончания срока действия сертификата, находящегося в реестре удостоверяющего Центра регистрации ключей (ЦРК);\n- наименование средств ЭЦП, с которыми используется данный открытый ключ;\n- наименование и местонахождение удостоверяющего ЦРК, выдавшего сертификат ключа ЭЦП;\n- инициатор обмена электронными документами;\n- тип документа;\n- хеш-код документа.\nVIII. ПОРЯДОК ВНЕСЕНИЯ ИЗМЕНЕНИЙ В РЕГЛАМЕНТ\n8.1. Текст настоящего Регламента публикуется по адресу www.L-Factura/oferta-ru/.\n8.2. Исполнитель имеет право в одностороннем порядке вносить изменения и дополнения в настоящий Регламент в порядке, оговоренном в пункте 10.2. Договора.\n8.3. С целью обеспечения гарантированного ознакомления с изменениями и/или дополнениями, внесенными в Регламент, Заказчик обязуется не реже одного раза в календарную неделю обращаться на сайт Исполнителя за сведениями об изменениях условий настоящего Регламента.\n`;\n","import { useSelector } from \"@hooks\";\nimport { authActions } from \"@redux/slices/authSlice\";\nimport { useDispatch } from \"@hooks\";\n\nconst useAuth = () => {\n const { auth, profile } = useSelector((state) => state.auth);\n const dispatch = useDispatch();\n\n const setAuth = (auth: boolean) => {\n dispatch(authActions.setAuth(auth));\n };\n const setProfile = (profile) => {\n dispatch(authActions.setProfile(profile));\n };\n\n return { auth, profile, setAuth, setProfile };\n};\n\nexport default useAuth;\n","export default __webpack_public_path__ + \"static/media/logo.be2ee5b6.svg\";","import { useState, useEffect } from \"react\";\nimport { Card, Button } from \"shards-react\";\nimport { KeySelect, KeyOptions } from \"./KeySelect\";\nimport { PublicOffer } from \"./PublicOffer\";\nimport imageKey from \"@assets/images/icon/Vector.png\";\nimport Warning from \"@assets/images/icon/icon1.png\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport EImzo from \"@api/EImzo\";\nimport styled from \"styled-components\";\nimport { useRouteMatch } from \"react-router-dom\";\nimport Logo from \"@assets/images/logo.svg\";\nimport AuthApi from \"@api/Auth\";\nimport User from \"@utils/constants/User\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport makeStyles from \"@utils/styles/makeStyles\";\n\nfunction Auth() {\n const { url } = useRouteMatch();\n const { classes, cx } = useStyles();\n\n const isSignDoc = url.includes(\"sign-doc\");\n\n const { setAuth, setProfile } = useAuth();\n\n const [success, setSuccess] = useState(false);\n const [keys, setKeys] = useState([]);\n const [selectedKey, setSelectedKey] = useState();\n const [showOptions, setShowOptions] = useState(false);\n const [publicOffer, setPublicOffer] = useState(false);\n const [triedAuth, setTriedAuth] = useState(false);\n\n const handleAuthClick = async () => {\n User.key = selectedKey;\n\n AuthApi.authorize()\n .then((response) => {\n if (!response) return;\n const { status, data } = response;\n status === 200 && setAuth(true);\n status === 202 && setPublicOffer(data);\n })\n .catch(notifyError);\n };\n\n const handleLoginAuto = async () => {\n try {\n const user = await AuthApi.login();\n\n const key = keys.find(\n (key) =>\n key.id.substring(4, 12).toLowerCase === user.keyId.toLowerCase()\n );\n setSelectedKey(key);\n\n setProfile({ name: user.CompanyName, tin: user.CompanyTin });\n setAuth(true);\n } catch (err) {\n console.log(err.message);\n } finally {\n setTriedAuth(true);\n }\n };\n\n useEffect(() => {\n if (!success) EImzo.loadKeys(setSuccess, setKeys);\n }, []);\n\n useEffect(() => {\n if (!triedAuth && keys.length > 0) handleLoginAuto();\n }, [keys, triedAuth]);\n\n useEffect(() => {\n if (success && keys.length > 0 && !selectedKey) setSelectedKey(keys[0]);\n }, [success, keys, selectedKey]);\n\n if (!success) {\n return (\n
\n

Идет загрузка ключей...

\n \n
\n );\n }\n\n let title = Войти;\n\n if (isSignDoc) title = SigninTitle;\n\n if (publicOffer) return ;\n\n return (\n \n \n {title}\n setShowOptions(true)}\n />\n \n Войти с помощью ЭЦП ключа\n \n {showOptions && (\n \n {\n setSelectedKey(selectedKey);\n setShowOptions(false);\n }}\n />\n\n setShowOptions(false)} />\n \n )}\n \n \n\n \n Перед выбором ключа убедитесь, что электронный ключ подключен к\n компьютеру. Не доверяйте свой электронный ключ другому лицу.\n \n \n \n \n );\n}\n\nconst SigninTitle = (\n <>\n
\n \n
\n \n Вам был выслан документ для подписи. Пожалуйта, авторизуйтесь, чтобы\n перейти к нему.\n \n \n);\n\nconst useStyles = makeStyles(() => ({\n container: {\n height: \"90vh\",\n minHeight: \"610px\",\n display: \"flex\",\n alignItems: \"center\",\n paddingTop: \"15px\",\n marginTop: \"20px\",\n justifyContent: \"center\",\n flexDirection: \"column-reverse\",\n transition: \"1s\",\n zIndex: 10000,\n },\n\n containerSignin: {\n maxWidth: \"unset\",\n },\n}));\n\nconst StyledCard = styled(Card)({\n maxWidth: \"620px\",\n width: \"100%\",\n height: \"80vh\",\n minHeight: \"610px\",\n maxHeight: \"610px\",\n paddingTop: \"52px\",\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n overflow: \"hidden\",\n});\n\nconst Title = styled.h1({\n marginBottom: \"79px\",\n color: \"#1793E5\",\n fontSize: \"32px\",\n fontWeight: \"600\",\n fontFamily: \"Golos\",\n});\n\nconst StyledButton = styled(Button)({\n minHeight: \"74px\",\n maxWidth: \"455px\",\n width: \"90%\",\n fontSize: \"18px\",\n background: \"#1793e5\",\n borderRadius: \"8px\",\n});\n\nconst AuthImage = styled.img({\n marginRight: \"10px\",\n borderRadius: \"50%\",\n border: \"1px solid #108adb\",\n padding: \"5px\",\n});\n\nconst WarningImage = styled.img({\n width: \"28px\",\n height: \"28px\",\n marginRight: \"20px\",\n});\n\nconst OptionsWrapper = styled.div({\n position: \"relative\",\n maxWidth: \"455px\",\n width: \"90%\",\n});\n\nconst WarningText = styled.p({\n width: \"480px\",\n height: \"auto\",\n fontSize: \"14px\",\n margin: \"0\",\n padding: \"5px\",\n});\n\nconst OptionsBackground = styled.div({\n position: \"fixed\",\n top: \"0\",\n display: \"flex\",\n bottom: \"0\",\n left: \"0\",\n right: \"0\",\n width: \"100%\",\n zIndex: \"8888\",\n height: \"100vh\",\n});\n\nconst WarningWrapper = styled.div({\n position: \"absolute\",\n bottom: \"0\",\n right: \"0\",\n left: \"0\",\n width: \"100%\",\n height: \"100px\",\n maxHeight: \"160px\",\n padding: \"10px\",\n background: \"#F8FCFF\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n paddingRight: \"20px\",\n});\n\nexport default Auth;\n","export enum FacturaTypes {\n Standart, Additional,\n Compensation, NoPayment, Corrected,\n CompensationCorrected\n}\n\n\nexport enum FacturaSingleTypes {\n Phis = 1, ExportAbroad,\n Import, RealizationGovSecret,\n Finance, MarketUndercost,\n CustomsUndercost, ExportAshore,\n OtherIncome, ExcisableForProcessing,\n ExcisableForSelf, ExcisableDifference, ExcisableLoss\n}\n\nexport enum VatRegStatuses {\n Active = 20, Inactive, InactiveTemp, VatPayerPlus = 30, Phis = 60\n}","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADbSURBVHgB3ZThEYIwDIVbJ3CEjsAIuAEjuIGOwAhu4AiwASPoBrgBbhAfZ+IFrz0k5Y+8u3eFUL6E0sY7JSLaY6jgAN+9963LFaAneKCperhwVuHlI4MaAWEsGTyY4QzoI/Fgho/rytWeE89N8N1MwoAf+MDtAX7C3aLKMfkGd5HYWGkwV46JFS/HVcUKhmTD603CWxVbDR6+AavBE/P+Fy5b9veOOAeP7ZxseBY0BVdQEjC9+/ryNqvgjapUYpLk4ixSoM/ncyJR7aziXRD4ulTQ3rzWiUSTk/kCBJdQQhYPCeUAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALdSURBVHgBvVZRbtNAEJ1Zr5pf3wBzAsoJGj7TCtK05YOPkPoEhRMkuUE5gUkrxAdtnYLSfLacoOEE+Aj+QEip4l1m1us0SSG2CeFJ0W7szbzM7MybQSiA4NOXqiOdOmpd1YAePXLtqxgQRrSOkkly6b98fpNnC5e9PDkfHAJim7YeFEMEWndf7++8hzKEwcehJysqJG82+btmT7R+p5S6ATmJ/EYjMufC0IWJ3BSO2CVTdbz/Y1EyHj/zX6XnlhL2LoYtBH1MW5eIIpUkfpFQMTgimiJiiWNUE7958KL/R8LTs6tdLSBMvSKP8K5D3sRQAuy10BsdBDxK7eBha6/We0DIYXQq+tZ4RvfQ2t/pwAronQ86mN5/TOF9moVXZAeI7NqQkWd5ZCcXV9/5s+wM22BbbFNWNsLsuSE02UhxN3dGYYR8eFAgc9kW2+TksxzWw9R1oDrrlr2zZWBbnHSzHIKLGqx3y+pnFum/pporQkoZbsqKOJhLpjVkzFxCQbT2th9DGVANs4fMJQTiE36mEtWHNcEIhgFuCaXBqAn8mIyKGiiSpXOQMjJ0FFaBVoh9v1SyeFBcXyl5apHdugL+M4TNIPgwGDyCNcGIfIpYCNAR7+5+qnKZVwbUUcxKvVMogK+8F0JUYU3ISo80+pvIyoGE9gjWBOocdV6ZS1gliOi7a1Xnn2JWp5nLZClrKK+O4wRBML3glWFszeg0r4aQNZRaCRe+57iVdp6holpqbc3p9H0DDoee0PqWhYDus9Ns1LqwAk7DYZuShNtTrJAasJ2D5kaMgOLtIAaQvjlO4nG3pAKZMBrPNLwxZhQ0mgfbU51+MEQFZ59J0WVgJS937Jv7Lc+vlAeQhjFWWr/1F377+zExDe/17NhHJ/s87LLIZ16TgnhU1J6UcovCxx6ZhON8oG7fyMKYS5hhYezLBScH/s0gvAgOlWme1Du5neHUE9JGkkZWKy7qIvPrLxlebSxrXtDsAAAAAElFTkSuQmCC\"","import {\n FETCH_DOCS_PENDING,\n FETCH_DOCS_SUCCESS,\n FETCH_DOCS_ERROR,\n FETCH_DOCS_FOR_EXPORT_PENDING,\n FETCH_DOCS_FOR_EXPORT_SUCCESS,\n FETCH_DOCS_FOR_EXPORT_ERROR,\n SET_DOCS_TO_PRINT\n} from \"../constants/docs\";\n\nexport const fetchDocsPending = () => {\n return {\n type: FETCH_DOCS_PENDING\n };\n};\n\nexport const fetchDocsSuccess = data => {\n return {\n type: FETCH_DOCS_SUCCESS,\n payload: { data }\n };\n};\n\nexport const fetchDocsError = () => {\n return {\n type: FETCH_DOCS_ERROR\n };\n};\n\nexport const fetchDocsForExportPending = () => {\n return {\n type: FETCH_DOCS_FOR_EXPORT_PENDING\n };\n};\n\nexport const fetchDocsForExportSuccess = data => {\n return {\n type: FETCH_DOCS_FOR_EXPORT_SUCCESS,\n payload: data\n };\n};\n\nexport const fetchDocsForExportError = () => {\n return {\n type: FETCH_DOCS_FOR_EXPORT_ERROR\n };\n};\n\nexport const setDocsToPrint = docsToPrint => {\n return {\n type: SET_DOCS_TO_PRINT,\n payload: docsToPrint\n };\n};\n","import {\n FETCH_COMPANIES_PENDING,\n FETCH_COMPANIES_SUCCESS,\n FETCH_COMPANIES_ERROR,\n REQUEST_COMPANY_INFO_SET_PENDING,\n REQUEST_COMPANY_INFO_SET_SUCCESS,\n REQUEST_COMPANY_INFO_SET_ERROR,\n SET_COMPANY_SET_AUTO,\n} from \"../constants/companies\";\nimport { saveValue } from \"../../utils/helpers\";\n\nexport const fetchCompaniesPending = () => {\n return {\n type: FETCH_COMPANIES_PENDING,\n };\n};\n\nexport const fetchCompaniesSuccess = (companies) => {\n return {\n type: FETCH_COMPANIES_SUCCESS,\n payload: { companies },\n };\n};\n\nexport const fetchCompaniesError = (error) => {\n return {\n type: FETCH_COMPANIES_ERROR,\n payload: { error },\n };\n};\n\nexport const requestCompanyInfoSetPending = () => {\n return {\n type: REQUEST_COMPANY_INFO_SET_PENDING,\n };\n};\n\nexport const requestCompanyInfoSetSuccess = (profile) => {\n saveValue(\"provider\", profile);\n return {\n type: REQUEST_COMPANY_INFO_SET_SUCCESS,\n payload: profile,\n };\n};\n\nexport const requestCompanyInfoSetError = (error) => {\n return {\n type: REQUEST_COMPANY_INFO_SET_ERROR,\n payload: { error },\n };\n};\n\nexport const setCompanyAuto = (setAuto) => {\n return {\n type: SET_COMPANY_SET_AUTO,\n payload: setAuto,\n };\n};\n","import {\n CHANGED_DOC_CREATE_FORM,\n CLOSED_DOC_CREATE_FORM,\n REQUESTED_DOC_CREATE_BY_COPY,\n REQUESTED_DOC_CREATE_BY_COPY_FINISHED,\n REQUEST_DOC_BEING_COPIED_INFO_SUCCESS,\n REQUEST_DOC_BEING_COPIED_INFO_PENDING,\n REQUEST_DOC_BEING_COPIED_INFO_ERROR,\n SET_DOC_IS_ADDITIONAL,\n SET_DOC_CREATED_IS_PREVIEWED\n} from \"../constants/docCreate\";\n\nexport const changedDocCreateForm = isChanged => {\n return {\n type: CHANGED_DOC_CREATE_FORM,\n payload: isChanged\n };\n};\n\nexport const closedDocCreateForm = () => {\n return {\n type: CLOSED_DOC_CREATE_FORM\n };\n};\n\nexport const requestDocCreateByCopy = docBeingCopiedId => {\n return {\n type: REQUESTED_DOC_CREATE_BY_COPY,\n payload: docBeingCopiedId\n };\n};\n\nexport const requestDocCreateByCopyFinished = () => {\n return {\n type: REQUESTED_DOC_CREATE_BY_COPY_FINISHED\n };\n};\n\nexport const requestDocBeingCopiedInfoPending = () => {\n return {\n type: REQUEST_DOC_BEING_COPIED_INFO_PENDING\n };\n};\n\nexport const requestDocBeingCopiedInfoSuccess = data => {\n return {\n type: REQUEST_DOC_BEING_COPIED_INFO_SUCCESS,\n payload: data\n };\n};\n\nexport const requestDocBeingCopiedInfoError = () => {\n return {\n type: REQUEST_DOC_BEING_COPIED_INFO_ERROR\n };\n};\n\nexport const setDocIsAdditional = type => {\n return {\n type: SET_DOC_IS_ADDITIONAL,\n payload: type\n };\n};\n\nexport const setDocCreatedIsPreviewed = (docIsPreviewed, docPreviewedData) => {\n return {\n type: SET_DOC_CREATED_IS_PREVIEWED,\n payload: {\n docIsPreviewed: docIsPreviewed,\n docPreviewedData: docPreviewedData\n }\n };\n};\n","import {\n FETCH_BALANCE_PENDING,\n FETCH_BALANCE_SUCCESS,\n FETCH_BALANCE_ERROR\n} from \"../constants/balance\";\n\nexport const fetchBalancePending = () => {\n return {\n type: FETCH_BALANCE_PENDING\n };\n};\n\nexport const fetchBalanceSuccess = balance => {\n return {\n type: FETCH_BALANCE_SUCCESS,\n payload: { balance }\n };\n};\n\nexport const fetchBalanceError = error => {\n return {\n type: FETCH_BALANCE_ERROR,\n payload: { error }\n };\n};\n","import { contragentActions } from \".\";\n\nexport const xxxIsLoadingPending = () => {\n return {\n type: \"XXX_PENDING\",\n };\n};\n\nexport const xxxIsLoadingSuccess = () => {\n return {\n type: \"XXX_SUCCESS\",\n };\n};\n\nexport const xxxIsLoadingError = () => {\n return {\n type: \"XXX_ERROR\",\n };\n};\n\nexport const dispatchIsLoadingPending = (dispatch) => {\n dispatch(xxxIsLoadingPending());\n};\n\nexport const dispatchIsLoadingSuccess = (\n dispatch,\n dataNeededToReload = \"docs\"\n) => {\n if (dataNeededToReload === \"docs\" || dataNeededToReload === \"contragentDoc\") {\n dispatch(contragentActions.setNeedToReload(true));\n }\n dispatch(xxxIsLoadingSuccess());\n};\n\nexport const dispatchIsLoadingError = (\n dispatch,\n dataNeededToReload = \"docs\"\n) => {\n if (dataNeededToReload === \"docs\" || dataNeededToReload === \"contragentDoc\") {\n dispatch(contragentActions.setNeedToReload(true));\n }\n dispatch(xxxIsLoadingError());\n};\n","import {\n CHANGE_COLUMN_VISIBILITY,\n CHANGE_PER_PAGE_LIMIT,\n CHANGE_SORT_BY_COLUMN,\n SET_NEED_TO_RELOAD,\n CHANGE_SORT_DIRECTION\n} from \"../constants/docsTable\";\n\nexport const changeColumnVisibility = column => {\n return {\n type: CHANGE_COLUMN_VISIBILITY,\n payload: column\n };\n};\nexport const changePerPageLimit = limit => {\n return {\n type: CHANGE_PER_PAGE_LIMIT,\n payload: limit\n };\n};\n\nexport const changeSortDirection = direction => {\n return {\n type: CHANGE_SORT_DIRECTION,\n payload: direction === \"desc\"\n };\n};\n\nexport const changeSortByColumn = column => {\n return {\n type: CHANGE_SORT_BY_COLUMN,\n payload: column\n };\n};\n\nexport const setNeedToReload = val => {\n return {\n type: SET_NEED_TO_RELOAD,\n payload: val\n };\n};\n","import {\n FETCH_DOC_PENDING,\n FETCH_DOC_SUCCESS,\n FETCH_DOC_ERROR,\n SET_NEED_TO_RELOAD\n} from \"../constants/contragent\";\n\nexport const fetchDocPending = () => {\n return {\n type: FETCH_DOC_PENDING\n };\n};\n\nexport const fetchDocSuccess = doc => {\n return {\n type: FETCH_DOC_SUCCESS,\n payload: doc\n };\n};\n\nexport const fetchDocError = () => {\n return {\n type: FETCH_DOC_ERROR\n };\n};\n\nexport const setNeedToReload = val => {\n return {\n type: SET_NEED_TO_RELOAD,\n payload: val\n };\n};\n","import {\n REQUEST_TO_CHANGE_OPTION_PENDING,\n REQUEST_TO_CHANGE_OPTION_SUCCESS,\n REQUEST_TO_CHANGE_OPTION_ERROR\n} from \"../constants/settings\";\n\nexport const requestToChangeOptionPending = () => {\n return {\n type: REQUEST_TO_CHANGE_OPTION_PENDING\n };\n};\n\nexport const requestToChangeOptionSuccess = () => {\n return {\n type: REQUEST_TO_CHANGE_OPTION_SUCCESS\n };\n};\n\nexport const requestToChangeOptionError = () => {\n return {\n type: REQUEST_TO_CHANGE_OPTION_ERROR\n };\n};\n","export const REQUEST_TO_CHANGE_OPTION_PENDING =\n \"REQUEST_TO_CHANGE_OPTION_PENDING\";\nexport const REQUEST_TO_CHANGE_OPTION_SUCCESS =\n \"REQUEST_TO_CHANGE_OPTION_SUCCESS\";\nexport const REQUEST_TO_CHANGE_OPTION_ERROR = \"REQUEST_TO_CHANGE_OPTION_ERROR\";\n","import {\n FETCH_ALL_PLANS_ERROR,\n FETCH_ALL_PLANS_SUCCESS,\n FETCH_ALL_PLANS_PENDING,\n FETCH_CURRENT_PLAN_ERROR,\n FETCH_CURRENT_PLAN_PENDING,\n FETCH_CURRENT_PLAN_SUCCESS,\n REQUEST_CURRENT_PLAN_CHANGE_PENDING,\n REQUEST_CURRENT_PLAN_CHANGE_SUCCESS,\n REQUEST_CURRENT_PLAN_CHANGE_ERROR,\n REQUEST_PLAN_RESET_PENDING,\n REQUEST_PLAN_RESET_SUCCESS,\n REQUEST_PLAN_RESET_ERROR\n} from \"../constants/plans\";\n\nexport const fetchAllPlansPending = () => {\n return {\n type: FETCH_ALL_PLANS_PENDING\n };\n};\nexport const fetchAllPlansSuccess = plans => {\n return {\n type: FETCH_ALL_PLANS_SUCCESS,\n payload: plans\n };\n};\nexport const fetchAllPlansError = () => {\n return {\n type: FETCH_ALL_PLANS_ERROR\n };\n};\nexport const fetchCurrentPlanPending = () => {\n return {\n type: FETCH_CURRENT_PLAN_PENDING\n };\n};\nexport const fetchCurrentPlanSuccess = currentPlan => {\n return {\n type: FETCH_CURRENT_PLAN_SUCCESS,\n payload: currentPlan\n };\n};\nexport const fetchCurrentPlanError = () => {\n return {\n type: FETCH_CURRENT_PLAN_ERROR\n };\n};\nexport const requestCurrentPlanChangePending = () => {\n return {\n type: REQUEST_CURRENT_PLAN_CHANGE_PENDING\n };\n};\nexport const requestCurrentPlanChangeSuccess = newPlan => {\n return {\n type: REQUEST_CURRENT_PLAN_CHANGE_SUCCESS,\n payload: newPlan\n };\n};\nexport const requestCurrentPlanChangeError = () => {\n return {\n type: REQUEST_CURRENT_PLAN_CHANGE_ERROR\n };\n};\nexport const requestPlanResetPending = () => {\n return {\n type: REQUEST_PLAN_RESET_PENDING\n };\n};\nexport const requestPlanResetSuccess = () => {\n return {\n type: REQUEST_PLAN_RESET_SUCCESS\n };\n};\nexport const requestPlanResetError = () => {\n return {\n type: REQUEST_PLAN_RESET_ERROR\n };\n};\n","import { fetchData } from \"@utils/helpers/network\";\n\ntype BalanceType = {\n date: string;\n money: number;\n package: number;\n tarif: number;\n};\n\nclass Payment {\n async fetchBalance() {\n const response = await fetchData(\"/hs/ut/balance\");\n return response;\n }\n\n async fetchRates() {\n return await fetchData(\"/hs/ut/getpricings\");\n }\n\n async fetchCurrentRate() {\n return await fetchData(\"/hs/ut/getpricing\");\n }\n\n async setRate(code: string | number) {\n return await fetchData(`/hs/ut/setpricing/${code}`);\n }\n\n async resetRate() {\n return await fetchData(`/hs/ut/reset`);\n }\n\n async enablePromo(code: string | number) {\n return await fetchData(`/hs/ut/promo/${code}`);\n }\n}\n\nexport default new Payment();\n","import { ActTypes } from \"@models/actTypes\";\nimport {\n DocumentType,\n DocumentSendType,\n FilteredDocsType,\n DocumentReplyType,\n} from \"@models/DocumentTypes\";\nimport { fetchData, postData } from \"@utils/helpers/network\";\nimport { notify, notifyError } from \"@utils/helpers/toast\";\nimport CommonApi from \"./CommonApi\";\nimport EImzo from \"./EImzo\";\n\ntype SendType = { info: any; id: string; type: ActTypes };\ntype ReplyType = {\n info: any;\n id: string;\n type: string;\n notes: any;\n action: string;\n};\n\nclass DocumentApi {\n async fetchInfo(id: string) {\n return await fetchData(`/hs/ut/getdocinfo/${id}`);\n }\n\n async fetchFilteredDocs(body) {\n const response = await postData(\n \"/hs/st/getfiltered\",\n body\n );\n return response;\n }\n\n async fetchId(isLocal: boolean = false) {\n try {\n const { data } = await fetchData<{ data: string; success: boolean }>(\n \"/hs/ut/getid\"\n );\n\n if (isLocal) return data.replace(\"-\", \"\");\n\n return data;\n } catch (error) {\n return \"\";\n }\n }\n\n async fetchIdLocal() {\n return await this.fetchId(true);\n }\n\n async fetchSign(id: string) {\n const response = await fetchData<{ sign: string }>(\n `/hs/st/getsignjson?id=${id}&reply=false`\n );\n\n return response.sign;\n }\n\n async saveDraft(body: SendType, isRecommended: boolean = false) {\n const document: DocumentSendType = {\n ИДДокумента: body.id,\n ДанныеДок: body.info,\n ТипДокумента: body.type\n }\n\n const link = isRecommended ? '/hs/v2_docs/recommendeddraft' : \"/hs/m/senddraft\"\n\n const response = await postData(link, document);\n return response;\n }\n\n async send(doc: SendType) {\n try {\n const { signature } = await EImzo.encrypt(doc.info);\n const ip = await CommonApi.fetchIp();\n\n const newBody: DocumentSendType = {\n ДанныеДок: signature,\n ИДДокумента: doc.id,\n ТипДокумента: doc.type,\n ИП: ip,\n };\n\n const response = await postData(\"/hs/m/send\", newBody);\n\n notify(`Документ (${doc.type}) успешно отправлен`, \"success\");\n\n return response;\n } catch (error) {\n handleError(error, doc);\n }\n }\n\n async delete(id: string, toast?: boolean) {\n const response = await fetchData(`/hs/ut/delete/${id}`);\n\n if (toast) notify(\"Документ успешно удален\", \"info\");\n\n return response;\n }\n\n async cancel(doc: SendType) {\n try {\n\n const ip = await CommonApi.fetchIp();\n const { signature } = await EImzo.encrypt(doc.info);\n\n const newDoc: DocumentSendType = {\n ДанныеДок: signature,\n ИДДокумента: doc.id,\n ТипДокумента: doc.type,\n ИП: ip,\n };\n\n const response = await postData(`/hs/m/cancel`, newDoc);\n\n notify(\"Документ успешно отменен\", \"info\");\n\n return response;\n } catch (error) {\n handleError(error, doc)\n }\n }\n\n async reply(doc: ReplyType, isAttached: boolean = true) {\n try {\n\n const ip = await CommonApi.fetchIp();\n const { signature } = await EImzo.encrypt(doc.info, isAttached);\n\n const newDoc: DocumentReplyType = {\n ИДДокумента: doc.id,\n ДанныеДок: signature,\n ТипДокумента: doc.type,\n Заметки: doc.notes,\n Действие: doc.action,\n ИП: ip,\n };\n\n const response = await postData(\"/hs/m/reply\", newDoc);\n\n const notifyText = `Документ успешно ${doc.action === \"accept\" ? \"подписан\" : \"отказан\"\n }`;\n\n notify(notifyText, \"info\");\n\n return response;\n } catch (error) {\n handleError(error, doc)\n }\n }\n}\n\nconst handleError = (error: Error, doc?) => {\n if (error.message.includes(\"soliq.uz\")) notify(`${doc.type} ${error.message}`, 'error')\n else notifyError(error);\n}\n\nexport default new DocumentApi();\n","import { ResponseReturn, StatusKeys } from \"@models\";\nimport {\n BindingAccessType,\n BindingType,\n BranchType,\n ExchangeInfoType,\n FactoredInfoType,\n MarksType,\n PrivilegyType,\n TinInfoType,\n} from \"@models/CompanyTypes\";\nimport {\n arrayToString,\n getCorrectQueries,\n getFactoredInfo,\n getFormattedDate,\n} from \"@utils/helpers\";\nimport { fetchData, postData, removeData } from \"@utils/helpers/network\";\nimport { notify } from \"@utils/helpers/toast\";\nimport CommonApi from \"./CommonApi\";\nimport EImzo from \"./EImzo\";\n\ntype CompanyType = {\n name: string;\n pinfl: string;\n roles: string[];\n status: StatusKeys;\n tin: string;\n};\n\ntype SelectCompanyReturn = {\n providerIsSet: boolean;\n providers: string[];\n};\n\ntype VatRateParams = {\n sellerTin: string;\n buyerTin: string;\n catalogCode: string;\n date: string;\n};\n\ntype VatRateResult = {\n vatRate: number | null;\n freeToChange: boolean;\n lgotaId: number | null;\n lgota: string | null;\n};\n\ntype VatRegResult = {\n success: boolean;\n reason: null | string;\n \"data\": {\n \"vatRegCode\": string;\n \"active\": boolean;\n \"isSafe\": boolean;\n \"suspended\": boolean;\n \"vatPayer\": boolean\n }\n}\n\ntype FetchMarksParams = {\n isSelected: boolean;\n searchValue: string;\n tin: string;\n byCode: boolean;\n page: number;\n count: number;\n};\n\ntype IsBudgetResult = {\n data: {\n account: string | null;\n isBudget: number;\n tin: string | null;\n };\n reason: string | null;\n success: boolean;\n};\n\ntype IsCommitentParams = {\n companyTin: string;\n searchTin: string;\n date?: string;\n};\n\ntype WaybillResponse = {\n \"waybillId\": string;\n \"carrierTin\": string;\n \"currentStateId\": number;\n \"sellerTin\": string;\n \"sellerName\": string;\n \"buyerTin\": string;\n \"buyerName\": string;\n \"products\": [\n {\n \"ordNo\": number;\n \"name\": string;\n \"measureId\": string;\n \"summa\": number;\n \"count\": number;\n \"totalSum\": number;\n \"catalogCode\": string;\n \"catalogName\": string;\n }\n ]\n}\n\nclass Company {\n async fetchEmployees() {\n return await fetchData(\"/hs/ut/bindings\");\n }\n\n async fetchCompanies(tin: string) {\n const response = await fetchData(\n `/hs/ut/getcompanies/?tin=${tin}`\n );\n\n return response;\n }\n\n async selectCompany(tin: string) {\n const response = await fetchData(\n `/hs/ut/setcompany/?tin=${tin}`\n );\n\n return response;\n }\n\n async fetchInfo(\n tin: string,\n date: string = getFormattedDate()\n ): Promise {\n try {\n const data = await fetchData>(\n `/hs/v2_soliq/info?tin=${tin}&date=${date}`\n );\n\n const result = data.result;\n\n return getFactoredInfo(result);\n } catch (err) {\n notify(\"Невозможно получить информацию от soliq.uz\", \"error\");\n return undefined as any;\n }\n }\n\n async setProvider(data: { ClientTin; ProviderTins }) {\n const { signature: sign } = await EImzo.encrypt(data);\n const response = await postData(\"/hs/ut/setprovider\", { sign });\n\n notify(\"Провайдер авторизован\", \"success\");\n\n return response;\n }\n\n async fetchVatRate(data: VatRateParams) {\n const { sellerTin, buyerTin, catalogCode, date } = data;\n\n const response = await fetchData>(\n `/hs/v2_soliq/vatRate?sellerTin=${sellerTin}&buyerTin=${buyerTin}&mxikCode=${catalogCode}&date=${date}`\n );\n\n return response.result;\n }\n\n async fetchVatRegCode(tin: number | string, date: string) {\n const response = fetchData(`hs/ut/getvatregcode/${tin}?date=${date}`)\n\n return response;\n }\n\n async fetchSettnigs() {\n return await fetchData<[{ setting: \"privilege\"; value: boolean }]>(\n `/hs/ut/settings`\n );\n }\n\n async setSettings(name: string, value: Value) {\n return await postData(`hs/ut/settings`, [{ setting: name, value }]);\n }\n\n async fetchMarks(body: Partial) {\n const { tin, isSelected, searchValue, page, count, byCode } = body;\n\n const queries = [\n { name: \"tin\", value: tin },\n { name: \"searchtext\", value: searchValue },\n { name: \"page\", value: page },\n { name: \"count\", value: count },\n { name: \"byCode\", value: byCode },\n { name: \"selected\", value: isSelected },\n ];\n\n const params = getCorrectQueries(queries);\n\n const response = await fetchData>(\n `/hs/v2_soliq/marks?${params}`\n );\n\n // `tin=${tin}&searchtext=${searchValue}&page=${page}&count=${count}&byCode=${byCode}&selected=${isSelected}`;\n\n return response.result;\n }\n\n async searchMarks(params: { text: string; byCode: boolean }) {\n const { text, byCode } = params;\n const response = await this.fetchMarks({\n searchValue: text,\n byCode,\n isSelected: false,\n });\n\n const marks = response.data.map((mark) => {\n const name = arrayToString(\n mark.subPositionName,\n mark.brandName,\n mark.attributeName\n );\n\n return { name, code: mark.mxikCode };\n });\n\n return marks;\n }\n\n async selectMark(tin: string, code: string) {\n const response = await postData(`/hs/v2_soliq/marks`, { tin, code });\n return response;\n }\n\n async unselectMark(tin: string, code: string) {\n const response = await removeData(`/hs/v2_soliq/marks`, { tin, code });\n return response;\n }\n\n async isBudget(tin: string) {\n const response = await fetchData(`/hs/ut/budget/${tin}`);\n\n return response.data.isBudget === 1;\n }\n\n async isCommitent(data: IsCommitentParams) {\n try {\n const { companyTin, searchTin, date = getFormattedDate() } = data;\n\n const response = await fetchData>(\n `/hs/v2_soliq/iscomitent?comission=${searchTin}&comitent=${companyTin}&date=${date}`\n );\n\n return response;\n } catch (er) {\n notify(\"Невозможно получить информацию от soliq.uz\", \"error\");\n return undefined;\n }\n }\n\n async bindEmployee(employee: BindingAccessType) {\n const ip = await CommonApi.fetchIp();\n const { signature: sign } = await EImzo.encrypt(employee);\n\n const response = await postData(\"/hs/ut/bindcompany\", { sign, ip });\n\n return response;\n }\n\n async unbindEmployee(companyTin: string, fizTin: string) {\n const ip = await CommonApi.fetchIp();\n const { signature: sign } = await EImzo.encrypt({\n Tin: companyTin,\n FizTin: fizTin,\n Fio: \"\",\n Roles: [],\n });\n\n const response = await postData(`/hs/ut/bindcompany`, { sign, ip });\n\n return response;\n }\n\n async fetchExchangeInfo(tin: string, lotId: string) {\n const response = await fetchData>(`/hs/v2_soliq/exchange?tin=${tin}&lotid=${lotId}`);\n return response.result\n }\n\n async fetchBranches(tin: string | number) {\n const response = await fetchData(`hs/ut/getbranches/${tin}`);\n return response;\n }\n\n // ----------\n\n async fetchRegions() {\n const response = await fetchData<[]>(`/hs/v2_catalogs/wb_regions?page=0&limit=25`);\n return response;\n }\n\n async fetchDistricts(regionId:string) {\n const response = await fetchData<[]>(`hs/v2_catalogs/wb_districts?regionId=${regionId}`);\n return response;\n }\n\n async fetchVillages(soato:string) {\n const response = await fetchData<[]>(`/hs/v2_catalogs/wb_villages?soato=${soato}`);\n return response;\n }\n\n async fetchTransports(value:string) {\n const response = await fetchData<[]>(`hs/v2_catalogs/wb_transport?tinOrPinfl=${value}`);\n return response;\n }\n\n // ----------\n\n async fetchPrivilegies() {\n const response = await fetchData('/hs/ut/privileges');\n\n return response;\n }\n\n async fetchTotalMarks(tin: string) {\n const marks = await this.fetchMarks({\n isSelected: true,\n tin: tin,\n page: 0,\n count: 1,\n })\n\n const totalMarks = await this.fetchMarks({\n isSelected: true,\n tin: tin,\n page: 0,\n count: marks.recordTotal,\n })\n\n return totalMarks;\n }\n\n async fetchWaybill(tin: string, id: string) {\n const response = await fetchData>(`/hs/v2_docs/waybills?tin=${tin}&id=${id}`)\n\n return response.result;\n }\n}\n\nexport default new Company();\n","import {\n docsActions,\n companiesActions,\n docCreateActions,\n balanceActions,\n docsTableActions,\n contragentActions,\n plansActions,\n isLoadingFireActions,\n} from \"../actions\";\nimport { getValue } from \"@utils/helpers\";\nimport moment from \"moment\";\nimport { notify } from \"@utils/helpers/toast\";\nimport { store } from \"../store\";\nimport { authActions } from \"@redux/slices/authSlice\";\nimport { initialProfile } from \"@utils/constants/Auth\";\nimport Url from \"@utils/constants/Url\";\nimport Payment from \"@api/Payment\";\nimport DocumentApi from \"@api/Document\";\nimport Company from \"@api/Company\";\nimport User from \"@utils/constants/User\";\nimport { FilteredDocType } from \"@models/DocumentTypes\";\n\nexport const getResource = async (addr) => {\n try {\n const res = await fetch(Url.host + addr, {\n headers: {\n Authorization: `Basic ${User.credentials}}`,\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n Token: User.token,\n },\n });\n\n if (res.status === 401) {\n const { dispatch } = store;\n dispatch(authActions.setAuth(false));\n\n User.token = \"_\";\n\n dispatch(authActions.setProfile(initialProfile));\n throw Error(\"Не авторизован\");\n } else if (!res.ok) {\n throw Error(\n \"Ошибка при подключении к \" + addr + \", получено \" + res.status\n );\n }\n\n const text = await res.text();\n const correcting = text\n .replace(/\\\\n/g, \"\\\\n\")\n .replace(/\\\\'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\\\\\"')\n .replace(/\\\\&/g, \"\\\\&\")\n .replace(/\\\\r/g, \"\\\\r\")\n .replace(/\\\\t/g, \"\\\\t\")\n .replace(/\\\\b/g, \"\\\\b\")\n .replace(/\\\\f/g, \"\\\\f\")\n // eslint-disable-next-line no-control-regex\n .replace(/[\\u0000-\\u0019]+/g, \"\");\n\n const data = JSON.parse(correcting);\n return data;\n } catch (err) {\n throw Error(err.message);\n }\n};\n\nexport const fetchDocs =\n (filter, page = 1, limit = 10, sort = \"updateDate\", sortType = true) =>\n async (dispatch) => {\n dispatch(docsActions.fetchDocsPending());\n\n DocumentApi.fetchFilteredDocs({\n ...filter,\n page: page,\n limit: limit,\n sort: sort,\n sortType: sortType ? \"desc\" : \"asc\",\n dateFrom: filter.dateFrom ? filter.dateFrom : new Date(\"1970\"),\n dateTo: filter.dateTo ? filter.dateTo : moment().endOf(\"day\"),\n })\n .then((data) => {\n dispatch(docsActions.fetchDocsSuccess(data));\n dispatch(docsTableActions.setNeedToReload(false));\n })\n .catch(() => {\n dispatch(docsActions.fetchDocsError());\n dispatch(docsTableActions.setNeedToReload(false));\n });\n };\n\nexport const fetchDocsForExport =\n (filter, docsCount, sort = \"updateDate\", sortType = true) =>\n async (dispatch) => {\n dispatch(docsActions.fetchDocsForExportPending());\n let allDocs: FilteredDocType[] = [];\n let pages = Math.ceil(docsCount / 1000);\n\n for (let page = 1; page <= pages; page++) {\n const { data } = await DocumentApi.fetchFilteredDocs({\n ...filter,\n page: page,\n limit: docsCount >= 1000 ? 1000 : docsCount,\n sort: sort,\n sortType: sortType ? \"desc\" : \"asc\",\n dateFrom: filter.dateFrom ? filter.dateFrom : new Date(\"1970\"),\n dateTo: filter.dateTo ? filter.dateTo : moment().endOf(\"day\"),\n });\n\n allDocs = [...allDocs, ...data];\n docsCount = docsCount >= 1000 ? docsCount - 1000 : docsCount;\n }\n\n dispatch(docsActions.fetchDocsForExportSuccess(allDocs));\n };\n\nexport const fetchBalance = () => async (dispatch) => {\n dispatch(balanceActions.fetchBalancePending());\n\n Payment.fetchBalance()\n .then((data) => {\n dispatch(balanceActions.fetchBalanceSuccess(data));\n })\n .catch(() => dispatch(balanceActions.fetchBalanceError()));\n};\n\nexport const fetchCompanies = () => async (dispatch) => {\n dispatch(companiesActions.fetchCompaniesPending());\n\n let tin = getValue(\"selectedKey\").vo.TIN;\n\n Company.fetchCompanies(tin)\n .then((data) => {\n dispatch(companiesActions.fetchCompaniesSuccess(data));\n })\n .catch(() => dispatch(companiesActions.fetchCompaniesError()));\n};\n\nexport const requestCompanyInfoSet = (tin) => async (dispatch) => {\n dispatch(companiesActions.requestCompanyInfoSetPending());\n\n Company.selectCompany(tin)\n .then((data) => {\n dispatch(companiesActions.requestCompanyInfoSetSuccess(data));\n })\n .catch(() => dispatch(companiesActions.requestCompanyInfoSetError()));\n};\n\nexport const getDocInfo = (id) => async (dispatch) => {\n dispatch(docCreateActions.requestDocBeingCopiedInfoPending());\n\n DocumentApi.fetchInfo(id)\n .then((data) => {\n console.log(data);\n\n dispatch(docCreateActions.requestDocBeingCopiedInfoSuccess(data));\n })\n .catch(() => dispatch(docCreateActions.requestDocBeingCopiedInfoError()));\n};\n\nexport const getDocForContragent = (id) => async (dispatch) => {\n dispatch(contragentActions.fetchDocPending());\n\n DocumentApi.fetchInfo(id)\n .then((data) => {\n dispatch(contragentActions.fetchDocSuccess(data));\n })\n .catch(() => dispatch(contragentActions.fetchDocError()));\n};\n\nexport const fetchAllPlans = () => async (dispatch) => {\n dispatch(plansActions.fetchAllPlansPending());\n\n Payment.fetchRates()\n .then((data) => {\n dispatch(plansActions.fetchAllPlansSuccess(data));\n })\n .catch(() => dispatch(plansActions.fetchAllPlansError()));\n};\n\nexport const fetchCurrentPlan = () => async (dispatch) => {\n dispatch(plansActions.fetchCurrentPlanError());\n\n Payment.fetchCurrentRate()\n .then((data) => {\n dispatch(plansActions.fetchCurrentPlanSuccess(data));\n })\n .catch(() => dispatch(plansActions.fetchCurrentPlanError()));\n};\n\nexport const requestCurrentPlanChange =\n (plan, nextDate) => async (dispatch) => {\n dispatch(plansActions.requestCurrentPlanChangePending());\n\n Payment.setRate(plan.code)\n .then(() => {\n const text = `Тариф успешно изменён${nextDate ? `. Переход произойдёт ${nextDate}г.` : \"\"\n }`;\n\n notify(text, \"success\");\n dispatch(plansActions.requestCurrentPlanChangeSuccess(plan));\n })\n .catch(() => dispatch(plansActions.requestCurrentPlanChangeError()));\n };\n\nexport const resetPlan = (action) => async (dispatch) => {\n dispatch(plansActions.requestPlanResetPending());\n\n Payment.resetRate()\n .then(() => {\n const text =\n action === \"transfer\"\n ? \"Переход на тариф завершён\"\n : \"Тариф успешно перезапущен\";\n\n notify(text, \"success\");\n dispatch(plansActions.requestPlanResetSuccess());\n dispatch(fetchBalance());\n })\n .catch(() => dispatch(plansActions.requestPlanResetError()));\n};\n\nexport const usePromo = (code) => async (dispatch) => {\n dispatch(isLoadingFireActions.xxxIsLoadingPending());\n\n Payment.enablePromo(code)\n .then(() => {\n notify(\"Промокод применён\", \"success\");\n dispatch(isLoadingFireActions.xxxIsLoadingSuccess());\n })\n .catch(() => {\n notify(\"Указан неверный промокод\", \"error\");\n dispatch(isLoadingFireActions.xxxIsLoadingError());\n });\n};\n","import { StatusKeys } from \"@models\";\nimport { VatRegStatuses } from \"@utils/constants/docs/factura\";\n\ntype PropsType = {\n status: StatusKeys | null;\n};\n\nconst StatusBlock = (props: PropsType) => {\n const { status } = props;\n\n const statusStyle = {\n backgroundColor: \"lime\",\n width: \"12.5px\",\n height: \"12.5px\",\n };\n\n let text = \"\";\n\n if (status === VatRegStatuses.Phis) {\n text = \"Физ. лицо\";\n }\n\n if (status === VatRegStatuses.Active) {\n text = \"Плательщик НДС (активный)\";\n }\n\n if (status === VatRegStatuses.Inactive) {\n text = \"Плательщик НДС (истекший)\";\n statusStyle.backgroundColor = \"salmon\";\n }\n\n if (status === VatRegStatuses.InactiveTemp) {\n text = \"Плательщик НДС (приостановленный)\";\n statusStyle.backgroundColor = \"salmon\";\n }\n\n if (status === VatRegStatuses.VatPayerPlus) {\n text = \"Плательщик налога с оборота\";\n }\n\n const statuses = Object.values(VatRegStatuses).filter(\n (item) => typeof item === \"number\"\n );\n\n if (status === null || !statuses.includes(status)) {\n text = \"Неизвестный статус\";\n statusStyle.backgroundColor = \"salmon\";\n }\n\n return (\n
\n \n

{text}

\n
\n );\n};\n\nexport default StatusBlock;\n","import { useSelector } from \"@hooks\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport {\n Card,\n Row,\n Col,\n ListGroupItem,\n CardTitle,\n ListGroup,\n CardHeader,\n CardBody,\n} from \"shards-react\";\nimport { fetchCompanies, requestCompanyInfoSet } from \"../../redux/thunks\";\nimport StatusBlock from \"../common/StatusBlock\";\n\nconst CompanyPicker = () => {\n const dispatch = useDispatch();\n const { setProfile } = useAuth();\n const { companies, setAuto } = useSelector((state) => state.companiesReducer);\n\n const handleProfileChange = (profile) => {\n dispatch(requestCompanyInfoSet(profile.tin));\n setProfile(profile);\n };\n\n const handleClick = (profile) => () => {\n handleProfileChange(profile);\n };\n\n useEffect(() => {\n dispatch(fetchCompanies());\n }, []);\n\n useEffect(() => {\n if (companies.length === 1 && setAuto) {\n handleProfileChange(companies[0]);\n }\n }, [companies]);\n\n return (\n \n {companies.map((company) => (\n \n \n \n

\n {company.pinfl || company.tin}\n

\n
\n \n {company.name}\n \n {company.roles.map((role) => (\n {role}\n ))}\n \n \n \n \n \n ))}\n
\n );\n};\n\nexport default CompanyPicker;\n","import { FormSelect, Container } from \"shards-react\";\n\nexport function LSelect(props) {\n const { options = [], style, noContainer } = props;\n\n let dropdown = (\n {\n if (props.onClick) props.onClick(e.target.value);\n if (props.onChange) props.onChange(e);\n }}\n selected={props.selected}\n >\n {options.map((elem) => (\n \n {elem.view}\n \n ))}\n \n );\n\n if (noContainer) {\n return dropdown;\n }\n\n return (\n \n {props.header && }\n {dropdown}\n \n );\n}\n","//@ts-nocheck\nimport React from \"react\";\nimport { GetProps } from \"@models\";\n\ntype WithModal = (\n WrappedComponent: Component\n) => React.FC & ModalProps>;\n\ntype ModalProps = {\n isOpen: boolean;\n ref?: any;\n};\n\nconst withModal: WithModal = (WrappedComponent) => {\n const Component = (props) => {\n const { isOpen, ref, ...others } = props;\n\n if (isOpen) return ;\n return null;\n };\n\n return Component;\n};\n\nexport default withModal;\n","import React, { useEffect } from \"react\";\nimport { useState } from \"react\";\nimport {\n Button,\n Modal,\n ModalHeader,\n ModalBody,\n Row,\n Col,\n FormInput,\n FormCheckbox,\n} from \"shards-react\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { InputEventType } from \"@models\";\nimport withModal from \"@utils/hoc/withModal\";\nimport { BindingAccessType } from \"@models/CompanyTypes\";\n\ntype PropsType = {\n onSubmit: (access: BindingAccessType) => void;\n onClose: () => void;\n currentBinding: any;\n};\n\nconst AddUsers = (props: PropsType) => {\n const { currentBinding, onClose, onSubmit } = props;\n const { profile } = useAuth();\n\n const [userName, setUserName] = useState(\"\");\n const [userTin, setUserTin] = useState(\"\");\n const [userRoles, setUserRoles] = useState([]);\n\n const handleClose = () => {\n onClose();\n setUserTin(\"\");\n setUserName(\"\");\n setUserRoles([]);\n };\n\n const handleCheck = (value: string) => {\n toggleRole(userRoles, setUserRoles, value);\n };\n\n const handleInputChange = (e: InputEventType) => {\n setUserTin(e.target.value);\n getUserNameByUserTin(e.target.value, setUserName);\n };\n\n const handleSubmit = () => {\n onSubmit({\n Tin: profile.tin,\n FizTin: userTin,\n Fio: userName,\n Roles: userRoles,\n });\n };\n\n useEffect(() => {\n if (currentBinding.tin ?? false) {\n setUserTin(currentBinding.tin);\n setUserName(currentBinding.name);\n }\n if (currentBinding.roles ?? false) {\n setUserRoles(currentBinding.roles);\n }\n }, [currentBinding]);\n\n return (\n
\n \n \n Редактирование прав сотрудника\n \n \n \n \n
ИНН/ПИНФЛ Физ. лица
\n \n \n \n
Ф.И.О
\n \n \n
\n \n \n {roles.map((role) => (\n \n ))}\n \n \n \n \n\n \n \n
\n
\n
\n );\n};\n\nexport default withModal(AddUsers);\n\nfunction toggleRole(roles, setRoles, value) {\n if (checkRole(roles, value)) {\n const newRoles = roles.filter((role) => +role !== +value);\n setRoles(newRoles);\n } else {\n setRoles([...roles, value]);\n }\n}\n\nfunction checkRole(roles, value) {\n return roles.map(Number).includes(Number(value));\n}\n\nconst getUserNameByUserTin = (tin, setUserName) => {\n if (tin.length !== 9 && tin.length !== 14) {\n setUserName(\"\");\n return;\n }\n\n Company.fetchInfo(tin).then((info) => {\n if (info.IsPhis) setUserName(info.Name);\n else setUserName(\"Неверный ИНН/ПИНФЛ!\");\n });\n};\n\nconst roles = [\n {\n value: \"12\",\n label: \"Подтверждение / отклонение ЭСФ\",\n },\n {\n value: \"11\",\n label: \"Отправка / отмена ЭСФ\",\n },\n {\n value: \"22\",\n label: \"Подтверждение / отклонение доверенностей\",\n },\n {\n value: \"21\",\n label: \"Отправка / отмена доверенностей\",\n },\n {\n value: \"32\",\n label: \"Подтверждение / отклонение ТТН\",\n },\n {\n value: \"31\",\n label: \"Отправка / отмена ТТН\",\n },\n {\n value: \"42\",\n label: \"Подтверждение / отклонение актов\",\n },\n {\n value: \"41\",\n label: \"Отправка / отмена актов\",\n },\n];\n","import { Col, ColProps } from \"shards-react\";\nimport clsx from \"clsx\";\n\ntype PropsType = {\n title: string;\n subtitle?: string;\n};\n\nconst PageTitle = (props: PropsType & ColProps) => {\n const { title, subtitle, className, ...attrs } = props;\n const classes = clsx(className, \"text-center\", \"text-md-left\", \"mb-sm-0\");\n\n return (\n \n {subtitle}\n

{title}

\n \n );\n};\n\nexport default PageTitle;\n","import Company from \"@api/Company\";\nimport { BindingAccessType } from \"@models/CompanyTypes\";\nimport { settingsActions } from \"@redux/actions\";\nimport { notifyError } from \"@utils/helpers/toast\";\n\nexport const fetchTinsNameThunk = (tins: string[]) => async (dispatch) => {\n try {\n dispatch(settingsActions.requestToChangeOptionPending());\n\n const links = tins.map((tin) => Company.fetchInfo(tin));\n\n const taxpayers = await Promise.all(links);\n\n const names = taxpayers.map((payer) => payer.Name);\n\n dispatch(settingsActions.requestToChangeOptionSuccess());\n return names;\n } catch (err) {\n notifyError(err);\n dispatch(settingsActions.requestToChangeOptionError());\n return undefined;\n }\n};\n\nexport const updateBindingThunk = () => async (dispatch) => {\n try {\n dispatch(settingsActions.requestToChangeOptionPending());\n const response = await Company.fetchEmployees();\n dispatch(settingsActions.requestToChangeOptionSuccess());\n\n return response;\n } catch (err) {\n notifyError(err);\n dispatch(settingsActions.requestToChangeOptionError());\n return undefined;\n }\n};\n\nexport const removeBindingThunk =\n (companyTin: string, FizTin: string) => async (dispatch) => {\n try {\n dispatch(settingsActions.requestToChangeOptionPending());\n const response = await Company.unbindEmployee(companyTin, FizTin);\n dispatch(settingsActions.requestToChangeOptionSuccess());\n\n return response;\n } catch (err) {\n notifyError(err);\n dispatch(settingsActions.requestToChangeOptionError());\n }\n };\n\nexport const saveBindingAccessThunk =\n (access: BindingAccessType) => async (dispatch) => {\n try {\n dispatch(settingsActions.requestToChangeOptionPending());\n const response = await Company.bindEmployee(access);\n dispatch(settingsActions.requestToChangeOptionSuccess());\n return response;\n } catch (err) {\n notifyError(err);\n dispatch(settingsActions.requestToChangeOptionError());\n }\n };\n","import { useState, useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Row, Col, Button } from \"shards-react\";\nimport AddUsers from \"./AddUsers\";\nimport PageTitle from \"../../common/PageTitle\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport makeStyles from \"@utils/styles/makeStyles\";\nimport {\n fetchTinsNameThunk,\n removeBindingThunk,\n saveBindingAccessThunk,\n updateBindingThunk,\n} from \"@redux/thunks/companyThunks\";\nimport {\n BindingAccessType,\n BindingType,\n TaxpayerType,\n} from \"@models/CompanyTypes\";\n\nconst UserCardsList = () => {\n const dispatch = useDispatch();\n const { profile } = useAuth();\n const { classes, cx } = useStyles();\n\n const [open, setOpen] = useState(false);\n const [bindings, setBindings] = useState(null);\n const [update, setUpdate] = useState(true);\n const [taxpayers, setTaxpayers] = useState<\n (TaxpayerType & { name: string })[]\n >([]);\n\n const [currentBinding, setCurrentBinding] = useState({\n tin: undefined,\n roles: undefined,\n });\n\n const handleModalToggle = () => {\n setOpen((open) => !open);\n };\n\n const handleModalClose = () => {\n handleModalToggle();\n setCurrentBinding({\n tin: undefined,\n roles: undefined,\n name: \"\",\n });\n };\n\n const handleBindingsUpdate = async () => {\n const bindings = await dispatch(updateBindingThunk());\n setBindings(bindings!);\n setUpdate(false);\n };\n\n const handleBindingRemove = (tin: string) => async () => {\n await dispatch(removeBindingThunk(profile.tin, tin));\n setTaxpayers((taxpayers) =>\n taxpayers.filter((taxpayer: any) => +taxpayer.tin !== +profile.tin)\n );\n };\n\n const handleNamesAttach = async () => {\n const tins = bindings?.taxpayers.map(({ tin }) => tin);\n const names = await dispatch(fetchTinsNameThunk(tins!));\n\n setTaxpayers(\n bindings!.taxpayers.map((payer, index) => ({\n ...payer,\n name: names?.[index]!,\n }))\n );\n };\n\n const handleModalSubmit = async (access: BindingAccessType) => {\n await dispatch(saveBindingAccessThunk(access));\n setUpdate(true);\n handleModalClose();\n };\n\n useEffect(() => {\n if (update) handleBindingsUpdate();\n }, [update]);\n\n useEffect(() => {\n if (bindings) handleNamesAttach();\n }, [bindings]);\n\n return (\n \n \n \n \n \n \n \n
\n \n Добавить\n \n
\n \n
\n \n \n {bindings && taxpayers.length > 0 ? (\n
\n
\n
Ф.И.О
\n
ИНН
\n
Кол-во прав
\n
\n
\n {taxpayers.map((taxpayer, i) => (\n
\n
\n
\n {taxpayer.name}\n
\n
{taxpayer.tin}
\n
\n {taxpayer.roles.length}\n
\n \n {\n setCurrentBinding(taxpayer);\n setOpen(true);\n }}\n outline\n pill\n >\n \n \n \n \n \n
\n
\n \n ))}\n \n ) : (\n
\n Нет добавленных сотрудников\n
\n )}\n \n\n \n
\n );\n};\n\nexport default UserCardsList;\n\nconst useStyles = makeStyles(() => ({\n tableWrapper: {\n boxShadow: \"0px 0px 5px 0px #ccc\",\n display: \"flex\",\n overflow: \"hidden\",\n margin: 0,\n flexDirection: \"column\",\n borderRadius: \"12px\",\n },\n rowDocs: {\n color: \"#7681A1\",\n cursor: \"pointer\",\n display: \"flex\",\n margin: \"0 auto\",\n width: \"100%\",\n background: \"#fff\",\n justifyContent: \"space-around\",\n borderTop: \"1px solid #eee\",\n height: \"53px\",\n paddingLeft: \"5px\",\n alignItems: \"center\",\n },\n row: {\n display: \"flex\",\n background: \"rgb(250, 251, 252)\",\n width: \"100%\",\n height: \"46px\",\n color: \"#7681A1\",\n alignItems: \"center\",\n borderBottom: \"1px solid #ecf2f4\",\n borderRadius: \"12px 12px 0 0\",\n margin: \"0 auto\",\n justifyContent: \"space-around\",\n },\n col: {\n width: \"28%\",\n textAlign: \"center\",\n },\n\n addBtn: {\n borderRadius: \"8px\",\n color: \"#7681A1\",\n background: \"#FFFFFF\",\n border: \"1px solid #d3e0e4\",\n },\n}));\n","import { fetchData } from \"@utils/helpers/network\";\nimport { notify } from \"@utils/helpers/toast\";\n\ntype AddParams = {\n name: string;\n id: string;\n recieved: boolean;\n accepted: boolean;\n rejected: boolean;\n};\n\nclass TelegramApi {\n async fetchUsers() {\n const response = await fetchData(\"/hs/ut/gettgid\");\n\n return response;\n }\n\n async addUser(params: AddParams) {\n try {\n const { name, id, recieved, accepted, rejected } = params;\n\n const response = await fetchData(\n `/hs/ut/addtgid/${name}/${id}/${recieved}/${accepted}/${rejected}`\n );\n\n return response;\n } catch (err) {\n notify(\"Не удалось добавить ID\", \"error\");\n }\n }\n\n async deleteUser(id: string) {\n try {\n await fetchData(`/hs/ut/deletetgid/${id}`);\n notify(\"Успешно удалено\", \"success\");\n } catch (err) {\n notify(\"Не удалось удалить\", \"error\");\n }\n }\n}\n\nexport default new TelegramApi();\n","import { useState, useEffect } from \"react\";\nimport {\n Button,\n Modal,\n ModalHeader,\n ModalBody,\n Row,\n Col,\n FormInput,\n FormCheckbox,\n Collapse,\n} from \"shards-react\";\n\nimport linkIcon from \"@assets/images/icons/link.png\";\nimport phoneIcon from \"@assets/images/icons/desktop_phone.png\";\nimport touchIcon from \"@assets/images/icons/touch.png\";\nimport copyIcon from \"@assets/images/icons/copy.png\";\nimport Telegram from \"@api/Telegram\";\n\nexport default function AddId(props) {\n const [tgName, setTgName] = useState(\"\");\n const [tgId, setTgId] = useState(\"\");\n const [recieved, setRecieved] = useState(true);\n const [accepted, setAccepted] = useState(true);\n const [rejected, setRejected] = useState(true);\n const [collapseTelegramInstructions, setCollapseTelegramInstructions] =\n useState(false);\n\n useEffect(() => {\n if (props.currentTelegram) {\n setTgId(props.currentTelegram.id);\n setTgName(props.currentTelegram.name);\n setRecieved(props.currentTelegram.rejected);\n setAccepted(props.currentTelegram.accepted);\n setRejected(props.currentTelegram.recieved);\n }\n }, [props.currentTelegram]);\n\n return (\n
\n {\n props.toggle(false);\n setTgId(\"\");\n setTgName(\"\");\n setRecieved(true);\n setAccepted(true);\n setRejected(true);\n }}\n modalClassName=\"createDocModal\"\n >\n {\n props.toggle(false);\n setTgId(\"\");\n setTgName(\"\");\n setRecieved(true);\n setAccepted(true);\n setRejected(true);\n }}\n >\n Подписка на уведомления\n \n \n \n setCollapseTelegramInstructions(!collapseTelegramInstructions)\n }\n style={{ cursor: \"pointer\" }}\n >\n Инструкции по привязке{\" \"}\n {!collapseTelegramInstructions ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n \n \n Перейдите по ссылке\n \n \n
\n \n \n \n \n Откройте Telegram\n \n \n \n \n \n Нажмите на Start\n \n \n \n \n \n Скопируйте ваш ID\n \n \n \n \n \n \n
Имя
\n setTgName(e.target.value)}\n value={tgName}\n >\n \n \n
Telegram ID:
\n setTgId(e.target.value)}\n />\n \n
\n \n \n setRecieved(!recieved)}\n >\n Полученные\n \n setAccepted(!accepted)}\n >\n Подписанные\n \n setRejected(!rejected)}\n >\n Отклоненные\n \n \n \n \n {\n await Telegram.addUser({\n name: tgName,\n id: tgId,\n recieved,\n accepted,\n rejected,\n });\n\n props.toggle(false);\n props.setUpdate(true);\n }}\n >\n Сохранить\n \n\n \n \n \n \n \n );\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAJsUlEQVR4Xu1aa5AUVxX+Ts8+IKhBlCoCQoAEdqeHGEUFKc2jIhrXhCSCC0wPEJCd3visWBKxEihJNIkmWmolitu9PAS6B7IBNA8SMQ+togxgLBPd6VleQSAhWKYoLEHcnZ0+1t1lZnpme2Z6HvtIQdf+2bl9zznfd7/7OOc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tCshKp9QETrwsQTtTMmpCUeCdOIVIGG2JBdfUChdrCrEIz6fWpXAALROgSp9wjIhCWJ064IZqUgRsP6xqpAQzTvVB9lqLFuQCimgYqVO9JVgH83ru5A1DRt09hw9o+uA7RAvE0p3DPVDTPOSkssuaJvj5JoCrVKGraXB9GbqUAwDkhLDIeNftCeGsDCZqdeBHB7HBBmniOig+c07dnG2SoM4h/95cVAMxODTAAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABrklEQVRoQ+1ZTUvDQBB9W40nT2rF6sGTlyB41R/SS6uIQiz4h0QjKqK59HeIVwXJRa/aQv24N5KVCAVpE2bSJEtjJ9dhZ+a9mTezZBVK/qmS549YAPXLpxUrqLhKYQfAYpEgbx07E4kjh+sXz9W57+ARCrUiEx/4zh1A0/WvAOybSD6KkTuAxpnfUwpLpQXQdH39N/msDBVNxIgGBEDRlA/5n84KGNoTH1rjPrBCp32w2U0qbOoKmN4TgO7qYN72jte/4kCkBmB6T0RJa+Dac+zY3ZQagOk98QtA4907sqt5VcDInuCO89QV4DrOOk25cQRAUVcNqUDSfZ3LjGiAeSsWEYuIE8TC1Zq0kLSQtNAQA5R4KHvWBTY4z40jIhYRi4j/m4ipKcKdDpQfys6Nk/pxgeuYSpCyc+MIgIkbo3mVlvJD2aWFkhjiMkMxTNm5caZPxA3Xf1XAKsVgnnYNvHmOvcb6uUsFnvjf6xSAvZOX5XCm/2DqIRwanf6stdU+3OjlUoHIye6pXwsrOAf0toJaoECPY9fQnwDuKqFq3bTsTpKP1CIeJ5kiz5QewA8sHqlAth4ZigAAAABJRU5ErkJggg==\"","import Telegram from \"@api/Telegram\";\nimport { useState, useEffect } from \"react\";\nimport { Row, Col, Button } from \"shards-react\";\nimport PageTitle from \"../../common/PageTitle\";\nimport AddId from \"./AddId\";\n\nexport function TelegramSettings(props) {\n const [open, setOpen] = useState(false);\n const [listID, setlistID] = useState([]);\n const [update, setUpdate] = useState(true);\n const [currentTelegram, setCurrentTelegram] = useState(null);\n\n useEffect(() => {\n if (update)\n updateListId(setUpdate, setlistID).then(() => {\n setCurrentTelegram(null);\n });\n }, [update]);\n\n return (\n <>\n \n \n \n \n \n
\n setOpen(true)}\n >\n Привязать аккаунт\n \n
\n \n \n {listID.length ? (\n
\n
\n
\n Имя\n
\n
\n ID\n
\n
\n Типы\n
\n
\n
\n {listID.map((id) => (\n
\n
\n
\n {id.name}\n
\n
\n {id.id}\n
\n
\n {id.recieved + id.accepted + id.rejected}\n
\n \n {\n await Telegram.deleteUser(id.id);\n setUpdate(true);\n }}\n >\n \n \n
\n
\n \n ))}\n \n ) : (\n
\n Нет добавленных телеграм аккаунтов\n
\n )}\n \n \n
\n \n );\n}\n\nconst tableWrapper = {\n boxShadow: \"0px 0px 5px 0px #ccc\",\n display: \"flex\",\n overflow: \"hidden\",\n margin: 0,\n flexDirection: \"column\",\n borderRadius: \"12px\",\n};\n\nconst rowDocs = {\n color: \"#7681A1\",\n cursor: \"pointer\",\n display: \"flex\",\n margin: \"0 auto\",\n width: \"100%\",\n background: \"#fff\",\n justifyContent: \"space-around\",\n borderTop: \"1px solid #eee\",\n height: \"53px\",\n paddingLeft: \"5px\",\n alignItems: \"center\",\n};\n\nconst row = {\n display: \"flex\",\n background: \"rgb(250, 251, 252)\",\n width: \"100%\",\n height: \"46px\",\n color: \"#7681A1\",\n alignItems: \"center\",\n borderBottom: \"1px solid #ecf2f4\",\n borderRadius: \"12px 12px 0 0\",\n margin: \"0 auto\",\n justifyContent: \"space-around\",\n};\n\nconst col = { width: \"28%\", textAlign: \"center\" };\n\nasync function updateListId(setUpdate, setlistID) {\n const users = await Telegram.fetchUsers();\n\n setlistID(users);\n setUpdate(false);\n}\n","import { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"@hooks\";\nimport { Row, Col, Collapse, Button, Modal, ModalBody } from \"shards-react\";\nimport PageTitle from \"../../common/PageTitle\";\nimport {\n fetchCurrentPlan,\n fetchAllPlans,\n requestCurrentPlanChange,\n resetPlan,\n} from \"../../../redux/thunks\";\n\nexport const Plans = () => {\n const { currentPlan, plans } = useSelector((state) => state.plansReducer);\n const { balance } = useSelector((state) => state.balanceReducer);\n const [tableCurrent, setTableCurrent] = useState(currentPlan);\n const [collapseSelectPlan, setCollapseSelectPlan] = useState(false);\n const [confirmPlanResetModalShow, setConfirmPlanResetModalShow] =\n useState(false);\n\n const [confirmPlanReset, setConfirmPlanReset] = useState(false);\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(fetchCurrentPlan());\n dispatch(fetchAllPlans());\n }, []);\n\n useEffect(() => {\n setTableCurrent(currentPlan);\n }, [currentPlan]);\n\n useEffect(() => {\n if (confirmPlanReset) {\n dispatch(resetPlan(\"reset\"));\n setConfirmPlanReset(false);\n }\n }, [confirmPlanReset]);\n\n return (\n <>\n \n \n

\n При перезапуске тарифа, текущий остаток документов будет\n аннулирован!\n

\n \n {\n setConfirmPlanReset(true);\n setConfirmPlanResetModalShow(false);\n }}\n >\n Подтвердить\n \n setConfirmPlanResetModalShow(false)}\n >\n Отменить\n \n \n
\n
\n\n \n \n

\n При перезапуске тарифа, текущий остаток документов будет\n аннулирован!\n

\n \n {\n setConfirmPlanReset(true);\n setConfirmPlanResetModalShow(false);\n }}\n >\n Подтвердить\n \n setConfirmPlanResetModalShow(false)}\n >\n Отменить\n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n {currentPlan && tableCurrent && plans && (\n <>\n {balance.date && (\n <>\n \n
\n \n Выбранный: {currentPlan.name} (перезапуск {balance.date}г.\n )\n \n
\n \n \n \n \n \n )}\n \n setCollapseSelectPlan(!collapseSelectPlan)}\n style={{ cursor: \"pointer\" }}\n >\n Список тарифов{\" \"}\n {!collapseSelectPlan ? (\n \n ) : (\n \n )}\n \n \n
\n
\n
\n Количество включенных документов\n
\n
\n Цена\n
\n
\n Стоимость отправки сверх лимита\n
\n
\n
\n {plans.map((plan) => (\n
\n
\n
\n {plan.docsNo}\n
\n
\n {plan.price} сум\n
\n
\n {plan.overLimitPrice} сум\n
\n \n
\n
\n \n ))}\n \n
\n \n \n )}\n
\n \n );\n};\n\nconst tableWrapper = {\n boxShadow: \"0px 0px 5px 0px #ccc\",\n display: \"flex\",\n overflow: \"hidden\",\n margin: 0,\n flexDirection: \"column\",\n};\n\nconst rowDocs = {\n color: \"#7681A1\",\n cursor: \"pointer\",\n display: \"flex\",\n margin: \"0 auto\",\n width: \"100%\",\n background: \"#fff\",\n justifyContent: \"space-around\",\n borderTop: \"1px solid #eee\",\n height: \"53px\",\n paddingLeft: \"5px\",\n alignItems: \"center\",\n};\n\nconst row = {\n display: \"flex\",\n background: \"rgb(250, 251, 252)\",\n width: \"100%\",\n height: \"46px\",\n color: \"#7681A1\",\n alignItems: \"center\",\n borderBottom: \"1px solid #ecf2f4\",\n borderRadius: \"12px 12px 0 0\",\n margin: \"0 auto\",\n justifyContent: \"space-around\",\n};\n\nconst col = { width: \"28%\", textAlign: \"center\" };\n","export enum facturaXls {\n facturaNo = 1, facturaDate, contractNo, contractDate, empowermentNo, empowermentDate, empowermentFullname, empowermentTin,\n itemReleasedFullname, sellerName, sellerTin, buyerTin = 23,\n productName = 35, measureId, count, sum, deliverySum, vatRate, vatSum, deliverySumWithVat,\n exciseRate, exciseSum\n}","import Company from \"@api/Company\";\nimport { MarkType } from \"@models/CompanyTypes\";\nimport { arrayToString } from \"@utils/helpers\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport { useEffect } from \"react\";\nimport { Button } from \"shards-react\";\n\ntype PropsType = {\n marks: MarkType[];\n pageCount: number;\n fetchBranches: () => void;\n onPageChange: (number) => void;\n page: number;\n tin: string;\n onMarksLoad: Function;\n};\n\nconst Marks = (props: PropsType) => {\n const {\n fetchBranches,\n pageCount,\n marks,\n onPageChange,\n page,\n tin,\n onMarksLoad,\n } = props;\n\n const handleLoad = () => {\n onMarksLoad();\n };\n\n const handleRemove = (code: string) => () => {\n Company.unselectMark(tin, code).then(handleLoad).catch(notifyError);\n };\n\n const handleMove = (type: string) => () => {\n if (type === \"next\") if ((page + 1) * 5 < pageCount) onPageChange(page + 1);\n if (type === \"prev\") if (page !== 0) onPageChange(page - 1);\n };\n\n useEffect(fetchBranches, [page]);\n\n if (marks.length === 0)\n return (\n
\n Нет добавленных кодов\n
\n );\n\n return (\n <>\n
\n
\n
Название
\n
Код
\n\n
\n
\n {marks.map((mark) => (\n
\n
\n {arrayToString(\n mark.subPositionName,\n mark.brandName,\n mark.attributeName\n )}\n
\n
\n {mark.mxikCode}\n
\n
\n \n \n \n
\n
\n ))}\n
\n
\n \n
{page + 1}
\n \n
\n \n );\n};\n\nexport default Marks;\n","import React from \"react\";\nimport ReactSelect, { createFilter } from \"react-select\";\nimport SelectCreatable from \"react-select/creatable\";\nimport AsyncSelect from \"react-select/async\";\nimport clsx from \"clsx\";\n// import { disableScroll, enableScroll } from \"@utils/helpers/scroll\";\nimport { ButtonBase } from \"@mui/material\";\nimport makeStyles from \"@utils/styles/makeStyles\";\n\ntype PropsType = {\n options: any[];\n optionLabel: string;\n optionValue: string;\n option: string | boolean | null;\n setOption: (param: any) => void;\n className?: string;\n placeholder?: string;\n isClearable?: boolean;\n separator?: null | string;\n isLoading?: boolean;\n noOptionsMessage?: () => string;\n isCreatable?: boolean;\n onSelectCreated?: (text: string) => void;\n isRemoveable?: boolean;\n onRemove?: (val: string) => void;\n isDisabled?: boolean;\n styles?: any;\n components?: any;\n clearValue?: number | string | null;\n autoFocus?: boolean;\n placement?: \"auto\" | \"top\" | \"bottom\";\n isAsync?: boolean;\n onInputChange?: (val: string) => void;\n};\n\ntype IReactSelectOption = { label: string; value: string } | null;\n\nconst BaseSelect: React.FC = (props) => {\n let Select = props.isCreatable ? SelectCreatable : ReactSelect;\n if (props.isCreatable) Select = SelectCreatable;\n else if (props.isAsync) Select = AsyncSelect;\n else Select = ReactSelect;\n\n const { classes } = useStyles();\n\n const {\n separator = null,\n isLoading = false,\n noOptionsMessage = () => \"Нет вариантов\",\n onSelectCreated,\n isRemoveable,\n onRemove = () => undefined,\n isDisabled,\n styles,\n components,\n clearValue,\n onInputChange,\n } = props;\n\n const handleSelectChange = (selectValue: IReactSelectOption) => {\n if (selectValue) props.setOption(selectValue.value);\n else props.setOption(clearValue === undefined ? \"\" : clearValue);\n };\n\n const options = props.options.map((option: any) => {\n if (typeof option !== \"object\") return { label: option, value: option };\n\n return {\n label: option[props.optionLabel],\n value: option[props.optionValue],\n };\n });\n\n const option = options.find((option: any) => {\n return option.value === props.option;\n });\n\n const selectorValue =\n props.option === \"\" ? { label: props.placeholder, value: \"\" } : option;\n\n const handleOptionRemove = (uid: string) => () => {\n const isConfirmed = window.confirm(\"Вы уверены?\");\n\n if (isConfirmed) onRemove(uid);\n };\n\n const handleInputChange = (value: string) => {\n onInputChange && onInputChange(value);\n };\n\n const customOption = (options: any) => {\n const { innerProps, data, innerRef, isSelected, isFocused } = options;\n const { label, value, __isNew__: isNew } = data;\n\n // removes lags on hover;\n const { onMouseMove, onMouseOver, ...newInnerProps } = innerProps;\n\n return (\n \n
{label}
\n {isRemoveable && (\n
\n {!isNew && (\n \n ×\n \n )}\n
\n )}\n \n );\n };\n\n return (\n separator,\n Option: customOption,\n }\n }\n styles={{\n control: () => ({\n border: \"none\",\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\",\n }),\n\n menuPortal: (base: any) => {\n return { ...base, zIndex: 10000000 };\n },\n\n ...styles,\n }}\n isLoading={isLoading}\n noOptionsMessage={noOptionsMessage}\n formatCreateLabel={(inputValue: string) => `Создать ${inputValue}`}\n onCreateOption={onSelectCreated}\n isDisabled={isDisabled}\n menuPlacement={props.placement || \"auto\"}\n filterOption={createFilter({ ignoreAccents: false })}\n // menuPortalTarget={document.body}\n // onMenuOpen={disableScroll}\n // onMenuClose={enableScroll}\n />\n );\n};\n\nexport default React.memo(BaseSelect);\n\nconst useStyles = makeStyles(() => ({\n select: {\n width: \"100%\",\n border: \"1px solid #ccc\",\n },\n\n selectOption: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n padding: \".5rem 0.5rem\",\n borderRadius: \"4px\",\n transition: \"background-color .1s\",\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: \"#DEEBFF\",\n },\n\n \"&:active\": {\n backgroundColor: \"#b2d4ff\",\n },\n },\n\n selectOption__selected: {\n backgroundColor: \"#2684ff\",\n color: \"white\",\n \"&:active, &:hover\": {\n backgroundColor: \"#2684ff\",\n color: \"white\",\n },\n },\n\n selectOption__focused: {\n backgroundColor: \"#DEEBFF\",\n },\n\n removeButton: {\n fontSize: \"2rem\",\n maxWidth: \"10px\",\n maxHeight: \"10px\",\n },\n}));\n","//@ts-nocheck\nimport { useState } from \"react\";\n\ntype UseFetchingType = (\n callback: Fn\n) => [(...args: Parameters) => ReturnType, boolean, string];\n\nconst useFetching: UseFetchingType = (callback) => {\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState(\"\");\n\n const fetching = async (...args: any[]) => {\n try {\n setIsLoading(true);\n return await callback(...args);\n } catch (e) {\n const error: Error | any = e;\n setError(error.message);\n } finally {\n setIsLoading(false);\n }\n };\n\n return [fetching, isLoading, error];\n};\n\nexport default useFetching;\n","import { Button, Col } from \"shards-react\";\nimport Company from \"@api/Company\";\nimport { MarkType } from \"@models/CompanyTypes\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport { useEffect, useState } from \"react\";\nimport BaseSelect from \"@components/common/BaseSelect\";\nimport useFetching from \"@hooks/useFetching\";\n\ntype PropsType = {\n selectedMark: Partial | null;\n onMarkChanged: (mark: Partial) => void;\n tin: string;\n onMarksLoad: Function;\n};\n\ntype MarkOption = { code: string; name: string };\n\nconst Searchers = (props: PropsType) => {\n const { selectedMark, onMarkChanged, tin, onMarksLoad } = props;\n\n const [marks, setMarks] = useState([]);\n\n const [mark, setMark] = useState({ name: \"\", code: \"\" });\n\n const handleMarkLoad = () => {\n onMarksLoad();\n };\n\n const handleMarkSearch = (value: string, byCode: boolean) => {\n return Company.searchMarks({ text: value, byCode });\n };\n\n const handleMarkAdd = (code: string) => () => {\n Company.selectMark(tin, code).then(handleMarkLoad).catch(notifyError);\n };\n\n const handleOptionChange = (value: string) => {\n const mark = marks.find((option) => {\n return option.name === value || option.code === value;\n });\n\n mark && setMark(mark);\n };\n\n const [fetchMark, isLoading] = useFetching(handleMarkSearch);\n\n const handleInputChange = (byCode: boolean) => async (value: string) => {\n if (value === \"\") return;\n fetchMark(value, byCode).then((options) => {\n options && setMarks(options);\n });\n };\n\n useEffect(() => {\n onMarkChanged({\n mxikCode: mark.code,\n className: mark.name,\n });\n }, [mark.name, mark.code]);\n\n return (\n <>\n \n \n\n {/* {\n const options = await handleMarkSearch(true)(val);\n console.log(options);\n return options;\n }}\n cacheOptions\n defaultOptions\n value={\n selectedMark?.mxikCode\n ? {\n label: selectedMark?.mxikCode,\n value: selectedMark?.mxikCode,\n }\n : null\n }\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n onChange={(inputVal) => {\n onMarkChanged({\n className: inputVal.label,\n mxikCode: inputVal.value,\n });\n }}\n placeholder=\"Поиск\"\n noOptionsMessage={() => \"Продукт не найден\"}\n /> */}\n \n \n \n \n\n {/* TODO: doesn't work :/ */}\n {/* \n {\n const options = await handleMarkSearch(false)(val);\n console.log(options);\n\n return options;\n }}\n // cacheOptions\n defaultOptions\n value={\n selectedMark?.className\n ? {\n label: selectedMark?.className,\n value: selectedMark?.className,\n }\n : null\n }\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n onChange={(inputVal) => {\n onMarkChanged({\n className: inputVal.label,\n mxikCode: inputVal.value,\n });\n }}\n placeholder=\"Поиск\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n */}\n \n \n \n \n \n \n );\n};\n\nexport default Searchers;\n","import { useState, useEffect } from \"react\";\nimport { Row, Col } from \"shards-react\";\nimport PageTitle from \"../../common/PageTitle\";\nimport { notifyError } from \"../../../utils/helpers/toast\";\nimport \"./RecentCods.css\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { MarksType, MarkType } from \"@models/CompanyTypes\";\nimport Marks from \"./Marks\";\nimport Searchers from \"./Searchers\";\n\nconst TelegramSettings = () => {\n const { profile } = useAuth();\n\n const [cods, setCods] = useState(null);\n const [marks, setMarks] = useState([]);\n\n const [selectedMark, setSelectedMark] = useState | null>(\n null\n );\n const [page, setPage] = useState(0);\n\n const fetchBranches = () => {\n Company.fetchMarks({\n tin: profile.tin,\n isSelected: true,\n page,\n count: 5,\n })\n .then((cods) => {\n setCods(cods);\n setMarks(cods.data);\n })\n .catch(notifyError);\n };\n\n const handlePageChange = (page: number) => {\n setPage(page);\n };\n\n const handleMarkChange = (mark: Partial | null) => {\n setSelectedMark(mark);\n };\n\n const handleMarksLoad = () => {\n fetchBranches();\n handleMarkChange(null);\n };\n\n useEffect(fetchBranches, [page]);\n\n return (\n <>\n \n \n \n \n\n \n\n \n \n \n \n \n );\n};\n\nexport default TelegramSettings;\n","import Company from \"@api/Company\";\nimport { useEffect, useState } from \"react\";\nimport { Col, FormCheckbox, Row } from \"shards-react\";\nimport { notify } from \"@utils/helpers/toast\";\nimport PageTitle from \"../../common/PageTitle\";\n\nconst Privileges = () => {\n const [privilege, setPrivilege] = useState(false);\n\n const handlePrivilegeFetch = () => {\n Company.fetchSettnigs()\n .then((settings) => {\n const setting = settings.find((el) => el.setting === \"privilege\");\n setting && setPrivilege(setting.value);\n })\n .catch((err) => notify(err.message, \"error\"));\n };\n\n const handlePrivilegeChange = () => {\n Company.setSettings(\"privilege\", !privilege)\n .then(() => setPrivilege(!privilege))\n .catch(() => {});\n };\n\n useEffect(() => {\n handlePrivilegeFetch();\n }, []);\n\n return (\n <>\n \n \n \n \n\n \n \n \n \n \n );\n};\n\nexport default Privileges;\n","import { Row, Col, Button } from \"shards-react\";\nimport PageTitle from \"../../common/PageTitle\";\nimport User from \"@utils/constants/User\";\nimport { notify } from \"@utils/helpers/toast\";\n\nconst Token = (props) => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n
{User.token}
\n \n \n
\n copyToClipboard(User.token)}\n >\n Скопировать\n \n
\n \n
\n \n );\n};\n\nconst copyToClipboard = async (str) => {\n await navigator.clipboard.writeText(str);\n notify(\"Токен скопирован\", \"success\");\n};\n\nexport default Token;\n","import UserCardsList from \"./Users/UserCardsList\";\nimport { TelegramSettings } from \"./TelegramAPI/TelegramSettings\";\nimport { Plans } from \"./Plans/Plans\";\nimport RecentCods from \"./RecentCods/RecentCods\";\nimport Privileges from \"./Privileges/Privileges\";\nimport Token from \"./Token\";\n\nconst Settings = (props) => {\n return (\n
\n \n
\n \n
\n \n
\n \n
\n \n\n
\n \n
\n );\n};\n\nexport default Settings;\n","export default __webpack_public_path__ + \"static/media/templateEnvoice.facbd750.xlsx\";","export default __webpack_public_path__ + \"static/media/templateAct.ea17c9bd.xlsx\";","import {\n FacturaProduct,\n FacturaProperties,\n FacturaType,\n} from \"@models/actTypes\";\n\nexport const marksDef = {\n ProductType: 0,\n KIZ: [] as string[],\n NomUpak: [] as string[],\n IdentTransUpak: [] as string[],\n};\n\nexport const prodDef: FacturaProduct = {\n OrdNo: 1,\n CommittentName: \"\",\n CommittentTin: \"\",\n CommittentVatRegCode: \"\",\n CommittentVatRegStatus: null,\n Name: \"\",\n Serial: \"\",\n MeasureId: \"\",\n BaseSumma: 0,\n ProfitRate: 0,\n Count: 0,\n Summa: 0,\n DeliverySum: 0,\n VatRate: 0,\n VatSum: 0,\n DeliverySumWithVat: 0,\n ExciseRate: 0,\n ExciseSum: 0,\n WithoutVat: false,\n CatalogCode: \"\",\n CatalogName: \"\",\n Barcode: \"\",\n LgotaId: null,\n Marks: marksDef,\n PackageCode: \"\",\n PackageName: \"\",\n LgotaName: \"\",\n LgotaVatSum: 0,\n LgotaType: null,\n};\n\nexport const personDef = {\n Name: \"\",\n Account: \"\",\n BankId: \"\",\n Address: \"\",\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: \"\",\n DistrictId: \"\",\n Director: \"\",\n Accountant: \"\",\n VatRegCode: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n VatRegStatus: null,\n TaxgGap: null,\n};\n\nexport const facturaVatRegStatuses = {\n 60: null,\n 30: null,\n 20: 20,\n 21: 21,\n 22: 22,\n};\n\nexport const exchangeProduct = {\n OrdNo: 0,\n ProductName: \"\",\n MeasureId: \"\",\n Count: 0,\n Summa: 0,\n TotalSum: 0,\n ProductCode: \"\",\n ProductProperties: \"\",\n};\n\nexport const facturaDef: FacturaType = {\n Version: 1,\n SingleSidedType: 0,\n IncomeType: 0,\n FacturaType: 0,\n FacturaId: \"\",\n HasMarking: false,\n FacturaDoc: {\n FacturaNo: \"\",\n FacturaDate: \"\",\n },\n OldFacturaDoc: {\n OldFacturaId: \"\",\n OldFacturaNo: \"\",\n OldFacturaDate: \"\",\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: \"\",\n },\n FacturaEmpowermentDoc: {\n AgentFacturaId: \"\",\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: \"\",\n AgentFio: \"\",\n AgentPinfl: \"\",\n },\n ItemReleasedDoc: {\n ItemReleasedFio: \"\",\n ItemReleasedPinfl: \"\",\n },\n SellerTin: \"\",\n BuyerTin: \"\",\n LotId: \"\",\n Seller: personDef,\n Buyer: personDef,\n ForeignCompany: {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n },\n ProductList: {\n FacturaProductId: \"\",\n Tin: \"\",\n HasExcise: false,\n HasCommittent: false,\n HasMedical: false,\n HasVat: false,\n HideReportCommittent: false,\n Products: [prodDef],\n },\n};\n\nexport const defaultFacturaProps: FacturaProperties = {\n isOneSided: false,\n isAutoCalc: true,\n isTinAlertShown: false,\n isActIncluded: false,\n isCustom: false,\n isAllCodes: false,\n isPrivileged: false,\n isTooltipOpen: false,\n isBudget: false,\n isFilling: false,\n};\n\nexport const measures = [\n {\n value: \"1\",\n view: \"штук\",\n },\n {\n value: \"4\",\n view: \"грамм\",\n },\n {\n value: \"2\",\n view: \"пачка\",\n },\n {\n value: \"5\",\n view: \"килограмм\",\n },\n {\n value: \"3\",\n view: \"миллиграмм\",\n },\n {\n value: \"7\",\n view: \"тонна\",\n },\n {\n value: \"6\",\n view: \"центнер\",\n },\n {\n value: \"10\",\n view: \"дециметр\",\n },\n {\n value: \"9\",\n view: \"сантиметр\",\n },\n {\n value: \"8\",\n view: \"миллиметр\",\n },\n {\n value: \"11\",\n view: \"метр\",\n },\n {\n value: \"12\",\n view: \"километр\",\n },\n {\n value: \"14\",\n view: \"кв. сантиметр\",\n },\n {\n value: \"16\",\n view: \"кв. метр\",\n },\n {\n value: \"15\",\n view: \"кв. дециметр\",\n },\n {\n value: \"13\",\n view: \"кв. миллиметр\",\n },\n {\n value: \"19\",\n view: \"куб. дециметр\",\n },\n {\n value: \"18\",\n view: \"кв. километр\",\n },\n {\n value: \"20\",\n view: \"куб. метр\",\n },\n {\n value: \"17\",\n view: \"1000 куб. метр\",\n },\n {\n value: \"24\",\n view: \"дал\",\n },\n {\n value: \"23\",\n view: \"литр\",\n },\n {\n value: \"21\",\n view: \"куб. километр\",\n },\n {\n value: \"25\",\n view: \"сум\",\n },\n {\n value: \"22\",\n view: \"миллилитр\",\n },\n {\n value: \"26\",\n view: \"комплект\",\n },\n {\n value: \"27\",\n view: \"сутки\",\n },\n {\n value: \"28\",\n view: \"час\",\n },\n {\n value: \"29\",\n view: \"пар\",\n },\n {\n value: \"30\",\n view: \"флакон\",\n },\n {\n value: \"31\",\n view: \"размещение\",\n },\n {\n value: \"32\",\n view: \"показы\",\n },\n {\n value: \"33\",\n view: \"коробка\",\n },\n {\n value: \"34\",\n view: \"моточас\",\n },\n {\n value: \"35\",\n view: \"Гкал\",\n },\n {\n value: \"36\",\n view: \"кВтч\",\n },\n {\n value: \"37\",\n view: \"рейс\",\n },\n {\n value: \"38\",\n view: \"упаковка\",\n },\n {\n value: \"39\",\n view: \"минут\",\n },\n {\n value: \"40\",\n view: \"норма/час\",\n },\n {\n value: \"41\",\n view: \"баллон\",\n },\n {\n value: \"42\",\n view: \"день\",\n },\n {\n value: \"43\",\n view: \"месяц\",\n },\n {\n value: \"44\",\n view: \"мегабайт\",\n },\n {\n value: \"45\",\n view: \"серия\",\n },\n {\n value: \"0\",\n view: \"другой\",\n },\n {\n value: \"46\",\n view: \"бутылка\",\n },\n {\n value: \"47\",\n view: \"кега\",\n },\n {\n value: \"48\",\n view: \"публикация\",\n },\n {\n value: \"49\",\n view: \"рулон\",\n },\n {\n value: \"50\",\n view: \"порция\",\n },\n {\n value: \"51\",\n view: \"погонный метр\",\n },\n {\n value: \"52\",\n view: \"га\",\n },\n];\n\nexport const alcoholTabacoCompanies = [\n \"200987017\",\n \"205442074\",\n \"301955170\",\n \"200349571\",\n \"200903659\",\n \"201891722\",\n \"202954024\",\n \"200851914\",\n \"200672734\",\n \"303365026\",\n \"200047964\",\n \"301040757\",\n \"200730044\",\n \"203740235\",\n \"201538312\",\n \"200961517\",\n \"301772320\",\n \"201887282\",\n \"200479972\",\n \"300070981\",\n \"201291281\",\n \"201290655\",\n \"301520586\",\n \"200441238\",\n \"200452983\",\n \"203174647\",\n \"200570520\",\n \"206978102\",\n \"202567735\",\n \"202645582\",\n \"200605435\",\n \"200564488\",\n \"202282989\",\n \"202419411\",\n \"302315143\",\n \"202273366\",\n \"200577234\",\n \"203391852\",\n \"202159862\",\n \"200579089\",\n \"200136308\",\n \"301088055\",\n \"200408363\",\n \"203303818\",\n \"203627975\",\n \"200547738\",\n \"200547634\",\n \"203025862\",\n \"302912366\",\n \"306856805\",\n \"300529645\",\n \"304861595\",\n \"305088550\",\n];\n","import { useState } from \"react\";\nimport { ExcelRenderer } from \"react-excel-renderer\";\nimport { Container, Row, FormSelect, Col, Button } from \"shards-react\";\nimport uploadIcon from \"@assets/images/icons/upload.png\";\nimport { notify } from \"@utils/helpers/toast\";\nimport { isEmptyObject, dateF, download } from \"@utils/helpers\";\nimport templateEnvoice from \"@assets/files/templateEnvoice.xlsx\";\nimport templateAct from \"@assets/files/templateAct.xlsx\";\nimport * as XSLX from \"xlsx\";\nimport { getResource } from \"@redux/thunks\";\nimport asyncBatch from \"async-batch\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport DocumentApi from \"@api/Document\";\nimport Company from \"@api/Company\";\nimport { ActTypes, FacturaProduct, FacturaType } from \"@models/actTypes\";\nimport { facturaDef, prodDef } from \"@components/CreateDoc/factura/constants\";\nimport { facturaXls } from \"@utils/constants/docs/excel\";\n\nvar errorCause = \"\";\n\ntype ImportDocType = ActTypes | \"Carrefour\" | \"ArtSoft\";\n\nexport function ImportFromXLS() {\n const { profile } = useAuth();\n\n const [docType, setDocType] = useState(\"Фактура\");\n const [importVal, setImportVal] = useState();\n const [loading, setLoading] = useState(false);\n const [errors, setErrors] = useState(\"\");\n const [status, setStatus] = useState(\"\");\n\n let templateLink;\n\n const fileHandler = () => {\n setLoading(true);\n if (docType === \"Carrefour\") {\n getSheetsCarrefour(importVal, profile, setLoading);\n return;\n }\n if (docType === \"ArtSoft\") {\n getSheetsArtSoft(importVal, profile, setLoading, setStatus);\n return;\n }\n ExcelRenderer(importVal, async (err, resp) => {\n if (err) {\n } else {\n let allImportDocs;\n\n console.log(resp.rows);\n\n switch (docType) {\n case \"Фактура\":\n allImportDocs = await getSheetsEnvoice(resp.rows, profile);\n break;\n case \"Акт\":\n allImportDocs = await getSheetsAct(resp.rows, profile);\n break;\n default:\n allImportDocs = await getSheetsEnvoice(resp.rows, profile);\n break;\n }\n\n console.log(allImportDocs);\n return;\n\n if (errorCause === \"\") {\n allImportDocs.forEach(async (data) => {\n DocumentApi.saveDraft({\n id: await DocumentApi.fetchId(),\n info: data,\n type: docType as ActTypes,\n }).then((res) => {\n if (res) notify(\"Документ успешно сохранен в черновики\", \"info\");\n else notify(\"Документ не сохранен успешно\", \"error\");\n });\n });\n } else {\n notify(errorCause, \"warning\");\n }\n }\n });\n setLoading(false);\n };\n\n switch (docType) {\n case \"Фактура\":\n templateLink = (\n

\n Вот шаблон для документов счет-фактур,\n \n Скачать Шаблон.\n {\" \"}\n Возникли проблемы? Прочитайте наше руководство на\n создание хорошей таблицы\n

\n );\n break;\n case \"Акт\":\n templateLink = (\n

\n Вот шаблон для документов Актов,\n \n Скачать Шаблон.\n {\" \"}\n Возникли проблемы? Прочитайте наше руководство на\n создание хорошей таблицы\n

\n );\n break;\n case \"Carrefour\":\n templateLink = (\n

\n Возникли проблемы? Прочитайте наше руководство на\n создание хорошей таблицы\n

\n );\n break;\n\n case \"ArtSoft\":\n templateLink = (\n

\n Возникли проблемы? Прочитайте наше руководство на\n создание хорошей таблицы\n

\n );\n break;\n default:\n templateLink = (\n

\n Вот шаблон для документов счет-фактур,\n \n Скачать Шаблон.\n {\" \"}\n Возникли проблемы? Прочитайте наше руководство на\n создание хорошей таблицы\n

\n );\n break;\n }\n\n return (\n \n \n Выберите тип документа\n \n \n \n setDocType(e.target.value as ImportDocType)}\n >\n \n \n {(+profile.tin === 306851622 || +profile.tin === 306799489) && (\n \n )}\n {(+profile.tin === 306851622 || +profile.tin === 305795653) && (\n \n )}\n \n \n \n {status}\n \n \n {loading ? (\n \n
\n
\n
\n
\n
\n
\n ) : (\n <>\n \n \n

Некоторые советы по импорту

\n {templateLink}\n \n\n \n setImportVal(e.target.files?.[0])}\n style={styleInput}\n />\n \"\"\n \n
\n \n \n \n Загрузить\n \n \n \n \n )}\n
\n );\n}\n\nasync function getCompanyInfo(tin: string) {\n return await Company.fetchInfo(tin);\n}\n\nasync function getSheetsCarrefour(file, profile, setLoading) {\n const fileReader = new FileReader();\n fileReader.readAsArrayBuffer(file);\n\n fileReader.onload = async (e) => {\n const bufferArray = e.target?.result;\n const workBook = XSLX.read(bufferArray, { type: \"buffer\" });\n\n const JDEUPD: any[] = XSLX.utils.sheet_to_json(\n workBook.Sheets[workBook.SheetNames[0]]\n );\n const list: any[] = XSLX.utils.sheet_to_json(\n workBook.Sheets[workBook.SheetNames[1]]\n );\n\n const sellerObj = await getCompanyInfo(profile.tin);\n const sortedObj = {};\n\n if (\n !JDEUPD.length ||\n !JDEUPD[0][\"Номер С/Ф\"] ||\n !JDEUPD[0][\"ИНН\"] ||\n !JDEUPD[0][\"Сумма\"] ||\n !JDEUPD[0][\"Дата\"] ||\n !JDEUPD[0][\"Наименование услугии\"] ||\n !list.length ||\n !list[0][\"Наименование компании \"] ||\n !list[0][\"Номер договора\"] ||\n !list[0][\"Дата договора\"]\n ) {\n notify(\"Не подходящая таблица\", \"error\");\n setLoading(false);\n return;\n }\n\n JDEUPD.forEach((el) => {\n if (!sortedObj[el[\"Номер С/Ф\"]]) {\n sortedObj[el[\"Номер С/Ф\"]] = el[\"ИНН\"];\n }\n });\n\n Object.keys(sortedObj).forEach(async (key, i, arr) => {\n const id = await DocumentApi.fetchId();\n const first = JDEUPD.find((el) => el[\"Номер С/Ф\"] == key);\n const buyerObj = await getCompanyInfo(first[\"ИНН\"]);\n\n const filtered = JDEUPD.filter((el) => el[\"Номер С/Ф\"] == key);\n const searched = list.find(\n (el) => el[\"Наименование компании \"] == sortedObj[key]\n );\n\n const factura: FacturaType = {\n ...facturaDef,\n FacturaId: id,\n FacturaDoc: {\n FacturaNo: key,\n FacturaDate: dateF(exelDateCorrect(first[\"Дата\"])),\n },\n ContractDoc: {\n ContractNo: searched[\"Номер договора\"],\n ContractDate: dateF(exelDateCorrect(searched[\"Дата договора\"])),\n },\n FacturaEmpowermentDoc: {\n ...facturaDef.FacturaEmpowermentDoc!,\n EmpowermentDateOfIssue: dateF(new Date()),\n },\n SellerTin: profile.tin,\n BuyerTin: buyerObj.Tin,\n Seller: sellerObj,\n Buyer: buyerObj,\n ForeignCompany: {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n },\n ProductList: {\n FacturaProductId: id,\n Tin: profile.tin,\n HasExcise: false,\n HasCommittent: false,\n HasMedical: false,\n HasVat: true,\n HideReportCommittent: false,\n Products: filtered.map(\n (prod, i) =>\n ({\n ...prodDef,\n OrdNo: i + 1,\n Name: prod[\"Наименование услугии\"],\n MeasureId: 1,\n Count: 1,\n Summa: prod[\"Сумма\"] / 1.15,\n DeliverySum: prod[\"Сумма\"] / 1.15,\n VatRate: 15,\n VatSum: (prod[\"Сумма\"] / 1.5) * 0.15,\n DeliverySumWithVat: prod[\"Сумма\"],\n CatalogName:\n prod[\"Наименование услугии\"] === \"Плата за рекламу \"\n ? \"Маркетинг и реклама : Прочие услуги по маркетингу и рекламе\"\n : \"Прочие услуги, нигде не поименованные : .\",\n CatalogCode:\n prod[\"Наименование услугии\"] === \"Плата за рекламу \"\n ? \"70705999\"\n : \"71299001\",\n } as FacturaProduct)\n ),\n },\n };\n\n let addParams = {\n ИДДокумента: id,\n ДанныеДок: factura,\n ТипДокумента: \"Фактура\" as ActTypes,\n };\n\n const res = await DocumentApi.saveDraft({\n type: addParams.ТипДокумента,\n id: addParams.ИДДокумента,\n info: addParams.ДанныеДок,\n });\n if (res) notify(\"Документ успешно сохранен в черновики\", \"info\");\n else notify(\"Документ не сохранен успешно\", \"error\");\n if (i === arr.length - 1) setLoading(false);\n });\n\n fileReader.onerror = () => setLoading(false);\n };\n}\n\nasync function checkProductCode(productCode, measureCode) {\n const res = await getResource(\"/hs/mxik/searchmark/\" + productCode);\n if (res && res.success && res.data.length > 0) {\n if (\n res.data[0].units.filter(\n (element) => String(measureCode) === String(element.id)\n ).length > 0\n )\n return {\n success: true,\n catalogName:\n (res.data[0].subPositionName !== null\n ? res.data[0].subPositionName\n : \"\") +\n (res.data[0].brandName !== null ? \" \" + res.data[0].brandName : \"\") +\n (res.data[0].attributeName !== null\n ? \" \" + res.data[0].attributeName\n : \"\"),\n };\n\n return {\n success: false,\n reason: \"Использована недопустимая единица измерения\",\n };\n } else\n return {\n success: false,\n reason: res ? res.reason : \"Не удалось проверить код ИКПУ\",\n };\n}\n\nasync function getSheetsArtSoft(file, profile, setLoading, setStatus) {\n let parallelFlows = 15;\n let errors = \"\";\n\n const fileReader = new FileReader();\n fileReader.readAsArrayBuffer(file);\n\n fileReader.onload = async (e) => {\n const bufferArray = e.target?.result;\n const workBook = XSLX.read(bufferArray, { type: \"buffer\" });\n\n const rows: any[] = XSLX.utils.sheet_to_json(\n workBook.Sheets[workBook.SheetNames[0]],\n { header: 1 }\n );\n\n if (rows[0][0] !== \"Форма загрузки для ART SOFT TEX CLUSTER\") {\n notify(\"Не подходящая таблица\", \"error\");\n setLoading(false);\n return;\n }\n\n async function rowHandler(row, index) {\n if (index <= 3) return;\n let okToSend = true;\n const id = await DocumentApi.fetchId();\n const buyerObj = await getCompanyInfo(row[2]);\n const sellerObj = await getCompanyInfo(row[1]);\n\n const factura: FacturaType = {\n ...facturaDef,\n FacturaId: id,\n ForeignCompany: {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n },\n FacturaDoc: {\n FacturaNo: \"#paxta-2021#\" + row[3],\n FacturaDate: dateF(exelDateCorrect(row[4])),\n },\n ContractDoc: {\n ContractNo: row[5],\n ContractDate: dateF(exelDateCorrect(row[6])),\n },\n FacturaEmpowermentDoc: {\n ...facturaDef.FacturaEmpowermentDoc!,\n EmpowermentDateOfIssue: dateF(new Date())!,\n },\n SellerTin: sellerObj.Tin,\n BuyerTin: buyerObj.Tin,\n Seller: { ...sellerObj },\n Buyer: { ...buyerObj },\n\n ProductList: {\n FacturaProductId: id,\n Tin: sellerObj.Tin,\n HasExcise: false,\n HasCommittent: false,\n HasMedical: false,\n HasVat: row[7] === \"Да\",\n HideReportCommittent: false,\n Products: [],\n },\n };\n\n let addParams = {\n ИДДокумента: id,\n ТипДокумента: \"Фактура\" as ActTypes,\n ДанныеДок: factura,\n };\n let counter = 1;\n for (let i = 0; i < 4; i++) {\n if (row[12 + i * 13] > 0) {\n // quantity is greater than 0\n\n const productCodeCheck = await checkProductCode(\n row[10 + i * 13],\n row[11 + i * 13]\n );\n if (!productCodeCheck.success) {\n errors +=\n \"Строка \" +\n row[0] +\n \": Неверный код ИКПУ или ед. изм.: \" +\n productCodeCheck.reason +\n \"\\n\";\n okToSend = false;\n continue;\n }\n\n const product: FacturaProduct = {\n ...prodDef,\n OrdNo: counter,\n CommittentName: \"\",\n CommittentTin: \"\",\n CommittentVatRegCode: \"\",\n Name: row[9 + i * 13],\n Serial: \"\",\n MeasureId: row[11 + i * 13],\n BaseSumma: 0,\n ProfitRate: 0,\n Count: row[12 + i * 13],\n Summa: row[13 + i * 13].toFixed(2),\n DeliverySum: row[14 + i * 13].toFixed(2),\n VatRate: row[15 + i * 13],\n VatSum: row[16 + i * 13].toFixed(2),\n DeliverySumWithVat: row[17 + i * 13].toFixed(2),\n ExciseRate: 0,\n ExciseSum: 0,\n WithoutVat: false,\n CatalogName: productCodeCheck.catalogName || \"\",\n CatalogCode: row[10 + i * 13],\n Barcode: \"\",\n Marks: {\n ProductType: 0,\n KIZ: [],\n NomUpak: [],\n IdentTransUpak: [],\n },\n };\n addParams.ДанныеДок.ProductList.Products.push(product);\n counter++;\n }\n }\n if (!okToSend) return;\n const res: any = await DocumentApi.saveDraft(\n {\n type: addParams.ТипДокумента,\n id: addParams.ИДДокумента,\n info: addParams.ДанныеДок,\n },\n true\n );\n if (res && res.ok) {\n } else errors += \"Строка \" + row[0] + \": Не удалось создать черновик \\n\";\n\n setStatus(\n \"\" +\n (index - 4) +\n \"/\" +\n (rows.length - 4) +\n \" \" +\n Math.round((100 * (index - 4)) / (rows.length - 4)) +\n \"%\"\n );\n }\n\n const result = await asyncBatch(rows, rowHandler, parallelFlows);\n setLoading(false);\n setStatus(\"\");\n download(\"import_logs.txt\", errors);\n fileReader.onerror = () => setLoading(false);\n };\n}\n\n// Импорт Фактуры\nasync function getSheetsEnvoice(xlsFile, profile) {\n const { facturaNo, sellerTin, buyerTin, productName, empowermentDate } =\n facturaXls;\n\n var simpleFactura: any = {};\n var allFacturas: any[] = [];\n var correctFactura = false;\n const sheet = xlsFile;\n\n let sellerObj = await getCompanyInfo(profile.tin);\n\n let curTin = \"\";\n let curNo = \"\";\n\n /**\n * Функция для проверки Даты.\n * Если оно пустой вернуть пустую строку\n * если дата(01.01.1991), отформатировать в 1991-01-01.\n */\n\n // var checkEmpowerDate = date => date === null ? '' : moment(date,'DD.MM.YYYY').format('YYYY-MM-DD');\n var checkEmpowerDate = (date) => (date == null ? \"\" : dateF(date));\n\n // Функция для проверки Значения. Возврат переданное значение в строке.\n var chekEmptyCell = (cell) => (cell == null ? \"\" : String(cell));\n\n //Функция для возврата числа или 0\n\n let NumberNull = (val) => (isNaN(Number(val)) ? 0 : Number(val));\n\n for (let index = 0; index < sheet.length; index++) {\n // Пока не начнётся Таблица с Данными - Пропустить Итерацию. До 9-ой строки.\n if (index <= 8) {\n continue;\n }\n\n const element = sheet[index];\n\n /**\n * Если эти ячейки одновременно \"Пустые после удаления\" (del-очищения в Exel)\n * Номер счет-фактуры (2-ая ячейка)\n * ИНН Исполнителя (12-ая ячейка)\n * ИНН Заказчика (24-ая ячейка)\n * Или Имя товара (36-ая ячейка)\n * Заверщить Цикл Иначе Продолжить\n *\n * То есть если это новая строка Продолжить.\n */\n\n if (\n (isEmptyObject(element[facturaNo]) ||\n isEmptyObject(element[sellerTin]) ||\n isEmptyObject(element[buyerTin])) &&\n isEmptyObject(element[productName])\n ) {\n break;\n }\n\n /**\n * Если\n * Номер счет-фактуры (2-ая ячейка)\n * ИНН Исполнителя (12-ая ячейка)\n * ИНН Заказчика (24-ая ячейка)\n * Одновременно не null(пустые) или наоборот, значит это корректная счет-Фактура. Продолжить.\n * Иначе Заверщить Цикл.\n */\n\n if (\n (element[facturaNo] != null ||\n element[sellerTin] != null ||\n element[buyerTin] != null) &&\n (element[facturaNo] == null ||\n element[sellerTin] == null ||\n element[buyerTin] == null)\n ) {\n correctFactura = false;\n\n if (element[facturaNo] == null) {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"Номер Счет-Фактуры\" не указано';\n } else if (element[sellerTin] == null) {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"ИНН Исполнителя\" не указано';\n } else {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"ИНН Заказчика\" не указано';\n }\n\n break;\n }\n\n // Порядковый Номер Продукта объявлено глобальной перемонной. Чтобы была возможность увеличить её.\n var productOrdNo = 1;\n\n /**\n * Если Номер, ИНН Исполнителя, ИНН Заказчика НЕ \"null\"\n * Значит это Новая счет-фактура.\n * Иначе Это Продолжения Предыдущей счет-фактуры(то есть следующий продукт в списке)\n */\n\n if (element[facturaNo] == curNo || element[facturaNo] == null) {\n /**\n * Увеличить порядковый номер\n * Создать объект следующего Товара\n */\n productOrdNo += 1;\n let nextProduct = {\n OrdNo: productOrdNo,\n CommittentName: \"\",\n CommittentTin: \"\",\n CommittentVatRegCode: \"\",\n Name: String(chekEmptyCell(element[35])),\n Serial: \"\",\n MeasureId: String(element[36]),\n BaseSumma: 0,\n ProfitRate: 0,\n Count: NumberNull(element[37]),\n Summa: NumberNull(element[38]),\n DeliverySum: NumberNull(element[39]),\n VatRate: NumberNull(element[40]),\n VatSum: NumberNull(element[41]),\n DeliverySumWithVat: NumberNull(element[42]),\n ExciseRate: NumberNull(element[43]),\n ExciseSum: NumberNull(element[44]),\n WithoutVat: false,\n };\n\n // Добавить в список (массив) новый Товар\n simpleFactura.ProductList.Products.push(nextProduct);\n } else {\n var buyerObj;\n\n if (element[facturaNo] != null && element[buyerTin] != null) {\n curNo = element[1];\n buyerObj = await getCompanyInfo(chekEmptyCell(element[buyerTin]));\n }\n\n /**\n * Проверка на корректность счет-фактуры.\n * Если Дата, Номер Договора, Дата Договора не указано\n * Считается что это \"не корректная\" счет-фактура.\n * Записать причину и заверщить цикл.\n */\n\n if (element[11] !== profile.tin) {\n correctFactura = false;\n errorCause = \"Ваша ИНН не соответствует указанной в файле\";\n break;\n } else if (isEmptyObject(element[2])) {\n correctFactura = false;\n errorCause = \"В \" + index + '-ой строке \"Дата Счет Фактуры\" не указано';\n break;\n } else if (isEmptyObject(element[3]) && element[3] == null) {\n correctFactura = false;\n errorCause =\n \"В \" + (index + 1) + '-ой строке \"Номер Договора\" не указано';\n break;\n } else if (isEmptyObject(element[4]) && element[4] == null) {\n correctFactura = false;\n errorCause =\n \"В \" + (index + 1) + '-ой строке \"Дата Договора\" не указано';\n break;\n }\n\n /**\n * TODO: нужно улучшить здесь.\n * Если SimpleFactura не пустая (заполнена данными из таблицы)\n * Или\n * Оно не пустая И это предпоследняя итерация цикла\n * Добавить SimpleFactura в список allFacturas перед записью нового.\n */\n if (!isEmptyObject(simpleFactura) && index === sheet.length - 1) {\n allFacturas.push(simpleFactura);\n }\n\n correctFactura = true;\n\n // Проверка даты Доверенности\n var EmpowermentDateOfIssue = checkEmpowerDate(element[empowermentDate]);\n\n // Записать Товар в объект и выложить в Массив.\n let product = [\n {\n OrdNo: productOrdNo,\n CommittentName: \"\",\n CommittentTin: \"\",\n CommittentVatRegCode: \"\",\n Name: String(chekEmptyCell(element[35])),\n Serial: \"\",\n MeasureId: String(element[36]),\n BaseSumma: 0,\n ProfitRate: 0,\n Count: NumberNull(element[37]),\n Summa: NumberNull(element[38]),\n DeliverySum: NumberNull(element[39]),\n VatRate: NumberNull(element[40]),\n VatSum: NumberNull(element[41]),\n DeliverySumWithVat: NumberNull(element[42]),\n ExciseRate: NumberNull(element[43]),\n ExciseSum: NumberNull(element[44]),\n WithoutVat: false,\n },\n ];\n\n simpleFactura = {\n FacturaId: await DocumentApi.fetchId(),\n Version: 1,\n FacturaType: 0,\n SingleSidedType: 1,\n FacturaDoc: {\n FacturaNo: chekEmptyCell(element[1]),\n FacturaDate: dateF(element[2]),\n },\n ContractDoc: {\n ContractNo: chekEmptyCell(element[3]),\n ContractDate: dateF(element[4]),\n },\n FacturaEmpowermentDoc: {\n AgentFacturaId:\n element[5] && element[6] && element[7] && element[8]\n ? await DocumentApi.fetchId()\n : \"\",\n EmpowermentNo: chekEmptyCell(element[5]),\n EmpowermentDateOfIssue: chekEmptyCell(EmpowermentDateOfIssue),\n AgentFio: chekEmptyCell(element[7]),\n AgentTin: chekEmptyCell(element[8]),\n },\n ItemReleasedDoc: {\n ItemReleasedFio: chekEmptyCell(element[9]),\n },\n SellerTin: sellerObj.Tin,\n BuyerTin: buyerObj.Tin,\n Seller: {\n Name: sellerObj.Name,\n Account: sellerObj.Account,\n BankId: sellerObj.BankId,\n Address: sellerObj.Address,\n Mobile: sellerObj.Mobile,\n WorkPhone: sellerObj.WorkPhone,\n Oked: sellerObj.Oked,\n DistrictId: sellerObj.DistrictId,\n Director: sellerObj.Director,\n Accountant: sellerObj.Accountant,\n VatRegCode: sellerObj.VatRegCode,\n },\n Buyer: {\n Name: buyerObj.Name,\n Account: buyerObj.Account,\n BankId: buyerObj.BankId,\n Address: buyerObj.Address,\n Mobile: buyerObj.Mobile,\n WorkPhone: buyerObj.WorkPhone,\n Oked: buyerObj.Oked,\n DistrictId: buyerObj.DistrictId,\n Director: buyerObj.Director,\n Accountant: buyerObj.Accountant,\n VatRegCode: buyerObj.VatRegCode,\n },\n ProductList: {\n FacturaProductId: await DocumentApi.fetchId(),\n Tin: profile.tin,\n HasExcise: element[43] != null,\n HasCommittent: false,\n HasMedical: false,\n HasVat: element[40] != null,\n Products: product,\n },\n };\n }\n }\n\n /**\n * TODO: нужно улучшить здесь.\n * Добавить последнию фактуру в список allFacturas\n */\n allFacturas.push(simpleFactura);\n return allFacturas;\n}\n\n// Импорт Актов\nasync function getSheetsAct(xslFile, profile) {\n var simpleAct: any = {};\n var allActs: any[] = [];\n var correctAct = false;\n const sheet = xslFile;\n var errorCause = \"\";\n let sellerObj = await getCompanyInfo(profile.tin);\n\n // Функция для проверки Значения. Возврат переданное значение в строке.\n var chekEmptyCell = (cell) => (cell == null ? \"\" : String(cell));\n\n for (let index = 0; index < sheet.length; index++) {\n const element = sheet[index];\n let buyerObj = await getCompanyInfo(chekEmptyCell(element[9]));\n\n // Пока не начнётся Таблица с Данными - Пропустить Итерацию. До 9-ой строки.\n if (index <= 8) {\n continue;\n }\n\n /**\n * Если эти ячейки одновременно \"Пустые после удаления\" (del-очищения в Exel)\n * Номер Акта (2-ая ячейка)\n * ИНН Исполнителя (7-ая ячейка)\n * ИНН Заказчика (9-ая ячейка)\n * Или Имя товара (11-ая ячейка)\n * Заверщить Цикл Иначе Продолжить\n *\n * То есть если это новая строка Продолжить.\n */\n\n if (\n (!isEmptyObject(element[1]) &&\n !isEmptyObject(element[7]) &&\n !isEmptyObject(element[9])) ||\n !isEmptyObject(element[11])\n ) {\n /**\n * Если\n * Номер Акта (2-ая ячейка)\n * ИНН Исполнителя (7-ая ячейка)\n * ИНН Заказчика (9-ая ячейка)\n * Одновременно не null(пустые) или наоборот, значит это корректный акт. Продолжить.\n * Иначе Заверщить Цикл.\n */\n\n if (\n (element[1] !== null && element[7] !== null && element[9] !== null) ||\n (element[1] == null && element[7] == null && element[9] == null)\n ) {\n // Порядковый Номер Продукта объявлено глобальной перемонной. Чтобы была возможность увеличить её.\n var productOrdNo = 1;\n\n /**\n * Если Номер, ИНН Исполнителя, ИНН Заказчика НЕ \"null\"\n * Значит это Новый Акт.\n * Иначе Это Продолжения Предыдущего акта(то есть следующий продукт в списке)\n */\n\n if (element[1] !== null && element[7] !== null && element[9] !== null) {\n /**\n * Проверка на корректность акта.\n * Если Дата, Номер Договора, Дата Договора не указано\n * Считается что это \"не корректный\" акт.\n * Записать причину и заверщить цикл.\n */\n\n if (element[7] !== sellerObj.Tin) {\n correctAct = false;\n errorCause = \"Ваша ИНН не соответствует указанной в файле\";\n break;\n } else if (isEmptyObject(element[2])) {\n correctAct = false;\n errorCause = \"В \" + index + '-ой строке \"Дата Акта\" не указано';\n break;\n } else if (isEmptyObject(element[3]) && element[3] == null) {\n correctAct = false;\n errorCause =\n \"В \" + (index + 1) + '-ой строке \"Номер Договора\" не указано';\n break;\n } else if (isEmptyObject(element[4]) && element[4] == null) {\n correctAct = false;\n errorCause =\n \"В \" + (index + 1) + '-ой строке \"Дата Договора\" не указано';\n break;\n }\n\n /**\n * TODO: нужно улучшить здесь.\n * Если simpleAct не пустая (заполнена данными из таблицы)\n * Или\n * Оно не пустая И это предпоследняя итерация цикла\n * Добавить simpleAct в список allActs перед записью нового.\n */\n if (!isEmptyObject(simpleAct) && index === sheet.length - 1) {\n allActs.push(simpleAct);\n }\n\n correctAct = true;\n\n // Записать Товар в объект и выложить в Массив.\n let product = [\n {\n OrdNo: productOrdNo,\n Name: String(chekEmptyCell(element[11])),\n MeasureId: String(element[12]),\n Count: String(element[13]),\n Summa: String(element[14]),\n TotalSum: String(element[15]),\n },\n ];\n\n simpleAct = {\n ActId: await DocumentApi.fetchId(),\n ActDoc: {\n ActNo: chekEmptyCell(element[1]),\n ActDate: dateF(element[2]),\n ActText: chekEmptyCell(element[3]),\n },\n ContractDoc: {\n ContractNo: chekEmptyCell(element[3]),\n ContractDate: dateF(element[4]),\n },\n SellerTin: sellerObj.Tin,\n SellerName: sellerObj.Name,\n BuyerTin: buyerObj.Tin,\n BuyerName: buyerObj.Name,\n BuyerDirector: buyerObj.Director,\n BuyerAccountant: buyerObj.Accountant,\n ProductList: {\n ActProductId: await DocumentApi.fetchId(),\n Tin: sellerObj.Tin,\n Products: product,\n },\n };\n } else {\n /**\n * Увеличить порядковый номер\n * Создать объект следующего Товара\n */\n productOrdNo += 1;\n let nextProduct = [\n {\n OrdNo: productOrdNo,\n Name: String(chekEmptyCell(element[11])),\n MeasureId: String(element[12]),\n Count: String(element[13]),\n Summa: String(element[14]),\n DeliverySum: String(element[15]),\n },\n ];\n\n // Добавить в список (массив) новый Товар\n simpleAct.ProductList.Products.push(nextProduct);\n }\n } else {\n correctAct = false;\n if (element[1] == null) {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"Номер Акта\" не указано';\n } else if (element[7] == null) {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"ИНН Исполнителя\" не указано';\n } else {\n errorCause =\n index +\n 1 +\n '-ая строка заполнена лишними данными или \"ИНН Заказчика\" не указано';\n }\n break;\n }\n } else {\n break;\n }\n }\n /**\n * TODO: нужно улучшить здесь.\n * Добавить последнию фактуру в список allFacturas\n */\n allActs.push(simpleAct);\n return allActs;\n}\n\nfunction exelDateCorrect(date) {\n if (typeof date === \"number\") {\n const correcting = new Date(\"01.01.1900\");\n correcting.setDate(correcting.getDate() + date - 2);\n return correcting;\n }\n return date;\n}\n\nconst styleInput = {\n padding: \"10px\",\n margin: \"10px auto\",\n width: \"100%\",\n height: \"92%\",\n paddingBottom: 0,\n};\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADuSURBVHgB7djbCYQwEIXhyVagHdjKVr6tpAPtIMssDkgQNpczA8L5QQjGhw8JGCPi1LIsm17iVBKHFJxS+ui4lPI+jiMLODj8gt7OW9kDD4XfoC04/iWgKnS+TOn4N4dc8xB4jda3a3PnOAsYPw2/Q1+XhI498FPwf2jLAz8Mb0VbaPwQvBdtIfHd8FG0hcJ3wWfRFgLfDEehrVn8yBqHfQUrvF89O751XYteLc967yS76oGPBNurREd4dIRHR3h0hEdHeHSER0d4dISzxpL9Xu377nLIj868XOPRER4d4dERHt1j4cnzYNKzx77xL/o+w7wVG00KAAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/ham.3d462e06.png\";","export default __webpack_public_path__ + \"static/media/cog.08c86f1a.png\";","export const productOptions = {\n vat: [\n {\n view: \"Привилигированные покупатели\",\n value: \"privileged_buyers\",\n filters: [\n {\n label: \"ИНН\",\n api: \"tin\",\n number: true\n },\n {\n label: \"Льгота\",\n api: \"lgotaName\"\n }\n ],\n data: [\n {\n label: \"ИНН\",\n prop: \"tin\"\n },\n {\n label: \"Компания\",\n prop: \"name\"\n },\n {\n label: \"Код льготы\",\n prop: \"lgotaId\"\n },\n {\n label: \"Льгота\",\n prop: \"lgotaName\"\n }\n ]\n },\n {\n view: \"Привилигированные продавцы\",\n value: \"privileged_sellers\",\n filters: [\n {\n label: \"ИНН\",\n api: \"tin\",\n number: true\n },\n {\n label: \"Льгота\",\n api: \"lgotaName\"\n }\n ],\n data: [\n {\n label: \"ИНН\",\n prop: \"tin\"\n },\n {\n label: \"Компания\",\n prop: \"name\"\n },\n {\n label: \"Код льготы\",\n prop: \"lgotaId\"\n },\n {\n label: \"Льгота\",\n prop: \"lgotaName\"\n }\n ]\n },\n {\n view: \"Товары - 0% НДС\",\n value: \"zero_vat_products\",\n filters: [\n {\n label: \"ИКПУ\",\n api: \"code\",\n number: true\n },\n {\n label: \"Услуга\",\n api: \"name\"\n },\n {\n label: \"Льгота\",\n api: \"lgotaName\"\n }\n ],\n data: [\n {\n label: \"ИКПУ\",\n prop: \"catalogCode\"\n },\n {\n label: \"Услуга\",\n prop: \"catalogName\"\n },\n {\n label: \"Код льготы\",\n prop: \"lgotaId\"\n },\n {\n label: \"Льгота\",\n prop: \"lgotaName\"\n }\n ]\n },{\n view: \"Товары без НДС\",\n value: \"without_vat_products\",\n filters: [\n {\n label: \"ИКПУ\",\n api: \"code\",\n number: true\n },\n {\n label: \"Услуга\",\n api: \"name\"\n },\n {\n label: \"Льгота\",\n api: \"lgotaName\"\n }\n ],\n data: [\n {\n label: \"ИКПУ\",\n prop: \"catalogCode\"\n },\n {\n label: \"Услуга\",\n prop: \"catalogName\"\n },\n {\n label: \"Код льготы\",\n prop: \"lgotaId\"\n },\n {\n label: \"Льгота\",\n prop: \"lgotaName\"\n }\n ]\n },\n {\n view: \"Услуги по возмещению\",\n value: \"reimbursement_services\",\n filters: [\n {\n label: \"Услуга\",\n api: \"name\"\n }\n ],\n data: [\n {\n label: \"ИКПУ\",\n prop: \"catalogCode\"\n },\n {\n label: \"Услуга\",\n prop: \"catalogName\"\n }\n ]\n },{\n view: \"Товары, не относимые в зачет\",\n value: \"nonCreditProducts\",\n filters: [\n {\n label: \"Услуга\",\n api: \"name\"\n }\n ],\n data: [\n {\n label: \"ИКПУ\",\n prop: \"catalogCode\"\n },\n {\n label: \"Услуга\",\n prop: \"catalogName\"\n }\n ]\n },\n ],\n};\n","import { Card, CardBody } from \"shards-react\";\n\nconst ListItem = (props: {\n product: any;\n dataMapping: { label: string; prop: string }[];\n}) => {\n const { product, dataMapping } = props;\n\n const dataView = dataMapping.map((el) => {\n return (\n

\n {el.label}: \n {product[el.prop]}\n

\n );\n });\n\n return (\n
\n \n {dataView}\n \n
\n );\n};\n\nexport default ListItem;\n","import { ChangeEvent, FC, useEffect, useMemo, useRef, useState } from \"react\";\nimport { getResource } from \"../../redux/thunks\";\nimport { notifyError } from \"../../utils/helpers/toast\";\nimport { LSelect } from \"../common/UtilComponents\";\nimport { productOptions } from \"./options\";\nimport { Row, Col, FormInput, Button } from \"shards-react\";\nimport ListItem from \"./ListItem\";\nimport { getParams } from \"../../utils/helpers\";\n\nexport type IRow = {\n dateBegin: string;\n dateEnd: string;\n lgotaId: number;\n lgotaName: string;\n name: string;\n tin: string;\n};\n\ntype IData = {\n rows: IRow[];\n totalCount: number;\n};\n\nconst initFilters = (vat: typeof productOptions.vat[0]) => {\n const initialValue = {};\n return vat.filters.reduce((obj, item) => {\n return {\n ...obj,\n [item.api]: \"\",\n };\n }, initialValue);\n};\n\nconst initPagination = {\n page: 0,\n limit: 10,\n};\n\nconst ProductList: FC = (props) => {\n const containerRef: any = useRef();\n const [data, setData] = useState(null);\n\n const [vat, setVat] = useState(productOptions.vat[0]);\n\n const [filters, setFilters] = useState(initFilters(productOptions.vat[0]));\n\n const [pagination, setPagination] = useState(initPagination);\n\n const pageNumber = useMemo(() => {\n const page =\n Math.ceil((data?.totalCount || 0) / (pagination.limit || 1)) || 1;\n if (isFinite(page)) {\n return page;\n }\n return 1;\n }, [pagination.limit, data?.totalCount]);\n\n const onFilterChanged = (property) => (e) => {\n setFilters((prev: any) => ({ ...prev, [property]: e.target.value }));\n };\n\n const onVatChanged = (e: ChangeEvent) => {\n const vatValue = productOptions.vat.find(\n ({ value }) => value === e.target.value\n );\n vatValue && setVat(vatValue);\n };\n\n const onPageButtonClicked = (prop: string) => () => {\n switch (prop) {\n case \"next\":\n setPagination((prev) => ({ ...prev, page: prev.page + 1 }));\n break;\n case \"prev\":\n setPagination((prev) => ({ ...prev, page: prev.page - 1 }));\n break;\n\n case \"start\":\n setPagination((prev) => ({ ...prev, page: 0 }));\n break;\n\n case \"end\":\n setPagination((prev) => ({ ...prev, page: pageNumber - 1 }));\n break;\n }\n };\n\n const isPrevDisabled = pagination.page === 0;\n const isNextDisabled = pagination.page === pageNumber - 1;\n\n useEffect(() => {\n const params: string[] = getParams(filters);\n const pageParams: string[] = getParams(pagination);\n\n const connectedParams =\n params.length > 0 || pageParams.length > 0\n ? \"?\" + params.join(\"&\") + \"&\" + pageParams.join(\"&\")\n : \"\";\n\n const execute = async () => {\n const response = await getResource(\n `/hs/v2_catalogs/${vat.value}${connectedParams}`\n );\n\n if (!response.ok) throw Error(response.errorDescription);\n\n setData(response.result);\n };\n\n try {\n execute();\n } catch (error) {\n notifyError(error);\n }\n }, [filters, vat, pagination]);\n\n useEffect(() => {\n setFilters(initFilters(vat));\n }, [vat]);\n\n let filterViews = vat.filters.map((el) => {\n return (\n \n \n \n );\n });\n\n return (\n
\n \n \n \n \n {/* \n \n */}\n \n {filterViews}\n \n \n \n \n {pagination.page + 1}/{pageNumber}\n \n \n \n \n \n {data?.rows.map((product) => {\n return (\n \n );\n })}\n \n
\n );\n};\n\nexport default ProductList;\n","import { getResource } from \"../../redux/thunks\";\nimport { notify } from \"@utils/helpers/toast\";\nimport User from \"@utils/constants/User\";\nimport Url from \"@utils/constants/Url\";\n\nexport function lavinaXhr(type, addr, async = false) {\n let xhr = new XMLHttpRequest();\n xhr.open(type, Url.host + addr, async);\n xhr.setRequestHeader(\"Authorization\", `Basic ${User.credentials}`);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.setRequestHeader(\"Token\", User.token);\n return xhr;\n}\n\nexport async function getCatalogInfo(query, from = \"code\") {\n if (query)\n return getResource(\"/hs/mxik/searchmark/\" + query)\n .then((res) =>\n res.data.map((product) => {\n let mxikName =\n (product.subPositionName ? product.subPositionName : \"\") +\n (product.brandName ? \" \" + product.brandName : \"\") +\n (product.attributeName ? \" \" + product.attributeName : \"\");\n return {\n label: from === \"code\" ? product.mxikCode : mxikName,\n value: from === \"code\" ? product.mxikCode : mxikName,\n secondArg: from === \"code\" ? mxikName : product.mxikCode,\n };\n })\n )\n .catch(() => []);\n\n return [];\n}\n\nexport const displayRequestError = (responseText, docType = \"\") => {\n const response = JSON.parse(responseText);\n\n if (response.errorMessage) {\n notify(\n docType + \"soliq.uz: \" + JSON.parse(responseText).errorMessage,\n \"error\"\n );\n } else {\n notify(responseText, \"error\");\n }\n};\n","import { SetState } from \"@models\";\nimport { FacturaProperties, FacturaType } from \"@models/actTypes\";\nimport { deepClone } from \"@utils/helpers\";\nimport {\n createContext,\n createElement,\n ReactNode,\n useEffect,\n useState,\n} from \"react\";\nimport { defaultFacturaProps, facturaDef } from \"./constants\";\n\ntype ProviderProps = {\n children: ReactNode;\n};\n\ntype PropertiesChangeFn = (\n field: keyof FacturaProperties,\n value: boolean | ((value: boolean) => boolean)\n) => void;\n\ntype FacturaChangeFn = (factura: FacturaType | ((factura: FacturaType) => FacturaType)) => void\n\ntype InitState = {\n factura: FacturaType;\n setFactura: SetState;\n\n properties: FacturaProperties;\n\n onFacturaChange: FacturaChangeFn;\n onPropertiesChange: PropertiesChangeFn;\n};\n\nconst FacturaContext = createContext({} as InitState);\n\nexport const FacturaContextProvider = (props: ProviderProps) => {\n const { children } = props;\n\n const [factura, setFactura] = useState(deepClone(facturaDef));\n const [properties, setProperties] = useState(defaultFacturaProps);\n\n const handleFacturaChange: FacturaChangeFn = (factura) => {\n setFactura(factura);\n };\n\n const handlePropertiesChange: PropertiesChangeFn = (field, value) => {\n if (typeof value === 'boolean') {\n setProperties((properties) => ({\n ...properties,\n [field]: value,\n }));\n } else {\n setProperties((properties) => ({\n ...properties,\n [field]: value(properties[field])\n }))\n }\n };\n\n useEffect(() => { }, []);\n\n return createElement(FacturaContext.Provider, {\n children,\n value: {\n factura,\n setFactura,\n\n properties,\n\n onFacturaChange: handleFacturaChange,\n onPropertiesChange: handlePropertiesChange,\n },\n });\n};\n\nexport default FacturaContext;\n","import FacturaContext from \"@components/CreateDoc/factura/FacturaContext\";\nimport { useContext } from \"react\";\n\nconst useFacturaContext = () => useContext(FacturaContext);\n\nexport default useFacturaContext;\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport Select from \"react-select\";\nimport AsyncSelect from \"react-select/async\";\nimport {\n Button,\n FormInput,\n FormSelect,\n Modal,\n ModalBody,\n ModalHeader,\n Tooltip,\n} from \"shards-react\";\nimport { getCatalogInfo } from \"@utils/EImzo/SrvCon\";\nimport { deleteProduct, roundFloat } from \"@utils/helpers\";\nimport \"./singleProductRow.css\";\nimport { FacturaProduct, FacturaType } from \"@models/actTypes\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport BaseSelect from \"@components/common/BaseSelect\";\nimport { notify } from \"@utils/helpers/toast\";\nimport useFacturaContext from \"@hooks/Factura/useFacturaContext\";\n\ntype PropsType = {\n index: number;\n product: FacturaProduct;\n products: FacturaProduct[];\n setProducts: React.Dispatch>;\n cods;\n privileges;\n factura: FacturaType;\n};\n\nfunction SingleProductRow(props: PropsType) {\n const { index, product, products, setProducts, cods, privileges, factura } =\n props;\n\n const hasExcise = factura.ProductList.HasExcise,\n hasMedical = factura.ProductList.HasMedical,\n hasVat = factura.ProductList.HasVat,\n hasCommittent = factura.ProductList.HasCommittent;\n\n const { profile } = useAuth();\n const { properties } = useFacturaContext();\n\n const [modal, setModal] = useState(false);\n const [tooltip, setTooltip] = useState(false);\n const [vatEditable, setVatEditable] = useState(false);\n\n const selectedProduct = useMemo(() => {\n return cods.find((cod) => cod.mxikCode === product.CatalogCode);\n }, [product, cods]);\n\n function handleProductChange(field: keyof FacturaProduct, value) {\n setProducts((prev) => {\n return prev.map((el, i) => {\n if (index === i) {\n return { ...el, [field]: value };\n }\n return el;\n });\n });\n }\n\n function handleMarksChange(field: string, i: number, text: string) {\n const newVal = {\n ...product.Marks,\n [field]: product.Marks?.[field].map((t, idx) => {\n if (idx === i) return text;\n return t;\n }),\n };\n\n handleProductChange(\"Marks\", newVal);\n }\n\n function addMarks(field, type) {\n const newVal = {\n ...product.Marks,\n [field]: type\n ? [...product.Marks?.[field], \"\"]\n : product?.Marks?.[field]?.slice(0, -1),\n };\n handleProductChange(\"Marks\", newVal);\n }\n\n const handleMeasureChange = (value: string) => {\n handleProductChange(\"MeasureId\", value);\n\n handleProductChange(\"PackageName\", \"\");\n handleProductChange(\"PackageCode\", \"\");\n };\n\n const handlePackageChange = (code: string) => {\n const Package = selectedProduct?.packageNames.find(\n (Package) => Package.code === code\n );\n\n handleProductChange(\"PackageName\", Package?.nameRu || \"\");\n handleProductChange(\"PackageCode\", code);\n\n handleProductChange(\"MeasureId\", \"\");\n };\n\n useEffect(() => {\n const count =\n product.Count === \"-\" ? -1 : parseFloat(String(product.Count));\n const summa =\n product.Summa === \"-\" ? -1 : parseFloat(String(product.Summa));\n\n const deliverySum = roundFloat(count * summa, -2);\n\n const exciseSum = roundFloat(count * product.ExciseRate, -2);\n const deliveryWithExcise = deliverySum + exciseSum;\n\n const amountVat = hasExcise\n ? roundFloat((deliveryWithExcise / 100) * product.VatRate, -2)\n : roundFloat((deliverySum / 100) * product.VatRate, -2);\n\n const deliveryWithVat = hasExcise\n ? deliveryWithExcise + amountVat\n : deliverySum + amountVat;\n\n if (properties.isAutoCalc == false) return;\n\n if (hasExcise) {\n if (product.DeliverySum !== deliveryWithExcise && !isNaN(deliverySum))\n handleProductChange(\"DeliverySum\", deliveryWithExcise);\n } else {\n if (product.DeliverySum !== deliverySum && !isNaN(deliverySum))\n handleProductChange(\"DeliverySum\", deliverySum);\n }\n\n if (product.ExciseSum !== exciseSum && !isNaN(exciseSum))\n handleProductChange(\"ExciseSum\", exciseSum);\n\n if (product.VatSum !== amountVat && !isNaN(amountVat))\n handleProductChange(\"VatSum\", amountVat);\n if (\n product.DeliverySumWithVat !== deliveryWithVat &&\n !isNaN(deliveryWithVat)\n )\n handleProductChange(\"DeliverySumWithVat\", deliveryWithVat);\n }, [product, hasExcise, properties.isAutoCalc]);\n\n // set VAT on MXIK code change\n useEffect(() => {\n if (\n factura === undefined ||\n product === undefined ||\n product.CatalogCode === undefined ||\n factura.SellerTin === undefined ||\n factura.FacturaDoc === undefined ||\n !hasVat\n )\n return;\n\n Company.fetchVatRate({\n sellerTin: factura.SellerTin,\n buyerTin: factura.BuyerTin,\n catalogCode: product.CatalogCode,\n date: factura.FacturaDoc.FacturaDate,\n })\n .then((vat) => {\n setVatEditable(vat.freeToChange);\n handleProductChange(\"WithoutVat\", vat.vatRate === null);\n handleProductChange(\"VatRate\", vat.vatRate === null ? 0 : vat.vatRate);\n\n if (vat.lgota !== null && vat.lgotaId !== null)\n handleProductChange(\"LgotaId\", vat.lgotaId);\n })\n .catch(() => {\n notify(\"Невозможно получить информацию о льготах\", \"error\");\n });\n }, [product.CatalogCode]);\n\n return (\n <>\n \n {product.OrdNo} \n {hasCommittent && (\n <>\n \n \n handleProductChange(\"CommittentName\", e.target.value)\n }\n value={product.CommittentName}\n size=\"sm\"\n />\n \n \n {\n handleProductChange(\"CommittentTin\", e.target.value);\n let vatRegData = await writeVatData(\n e.target.value,\n false,\n factura.FacturaDoc.FacturaDate,\n profile\n );\n if (vatRegData) {\n handleProductChange(\"CommittentName\", vatRegData.name);\n handleProductChange(\n \"CommittentVatRegCode\",\n vatRegData.regCode\n );\n }\n }}\n value={product.CommittentTin}\n size=\"sm\"\n />\n \n \n \n handleProductChange(\"CommittentVatRegCode\", e.target.value)\n }\n value={product.CommittentVatRegCode}\n size=\"sm\"\n />\n \n \n )}\n\n \n {properties.isCustom ? (\n \n handleProductChange(\"CatalogCode\", e.target.value)\n }\n value={product.CatalogCode}\n size=\"sm\"\n />\n ) : properties.isAllCodes ? (\n getCatalogInfo(inputVal, \"code\")}\n cacheOptions\n defaultOptions\n menuPlacement=\"auto\"\n menuPosition=\"fixed\"\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{ label: product.CatalogCode, value: product.CatalogCode }}\n onChange={(inputVal: any) => {\n handleProductChange(\"CatalogCode\", inputVal.value);\n handleProductChange(\"CatalogName\", inputVal.secondArg);\n }}\n placeholder=\"\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n ) : (\n {\n let mxikName =\n (product.subPositionName ? product.subPositionName : \"\") +\n (product.brandName ? \" \" + product.brandName : \"\") +\n (product.attributeName ? \" \" + product.attributeName : \"\");\n return {\n label: product.mxikCode,\n value: mxikName,\n };\n })}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: product.CatalogCode,\n value: product.CatalogName,\n }}\n onChange={(inputVal) => {\n handleProductChange(\"CatalogCode\", inputVal.label);\n handleProductChange(\"CatalogName\", inputVal.value);\n }}\n placeholder=\"Выберите Продукт\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n )}\n \n \n {properties.isCustom ? (\n \n handleProductChange(\"CatalogName\", e.target.value)\n }\n value={product.CatalogName}\n size=\"sm\"\n />\n ) : properties.isAllCodes ? (\n getCatalogInfo(inputVal, \"name\")}\n cacheOptions\n defaultOptions\n value={{ label: product.CatalogName, value: product.CatalogName }}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n onChange={(inputVal: any) => {\n handleProductChange(\"CatalogName\", inputVal.value);\n handleProductChange(\"CatalogCode\", inputVal.secondArg);\n }}\n placeholder=\"\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n ) : (\n {\n let mxikName =\n (product.subPositionName ? product.subPositionName : \"\") +\n (product.brandName ? \" \" + product.brandName : \"\") +\n (product.attributeName ? \" \" + product.attributeName : \"\");\n return {\n label: mxikName,\n value: product.mxikCode,\n };\n })}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: product.CatalogName,\n value: product.CatalogCode,\n }}\n onChange={(inputVal) => {\n handleProductChange(\"CatalogCode\", inputVal.value);\n handleProductChange(\"CatalogName\", inputVal.label);\n }}\n placeholder=\"Выберите Продукт\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n )}\n \n \n \n handleProductChange(\"Barcode\", e.target.value)\n }\n value={product.Barcode}\n size=\"sm\"\n />\n \n\n \n handleProductChange(\"Name\", e.target.value)}\n value={product.Name}\n size=\"sm\"\n />\n \n {hasMedical && (\n \n \n handleProductChange(\"Serial\", e.target.value)\n }\n value={product.Serial}\n size=\"sm\"\n />\n \n )}\n {/* \n handleProductChange(\"MeasureId\", measure)}\n value={product.MeasureId}\n size=\"sm\"\n />\n */}\n\n \n \n \n\n \n \n \n\n {hasMedical && (\n \n \n handleProductChange(\"BaseSumma\", +e.target.value)\n }\n value={product.BaseSumma}\n size=\"sm\"\n />\n \n )}\n {hasMedical && (\n \n \n handleProductChange(\"ProfitRate\", e.target.value)\n }\n value={product.ProfitRate}\n size=\"sm\"\n />\n \n )}\n \n handleProductChange(\"Count\", e.target.value)}\n value={product.Count}\n size=\"sm\"\n />\n \n \n handleProductChange(\"Summa\", e.target.value)}\n value={product.Summa}\n size=\"sm\"\n />\n \n {hasExcise && (\n <>\n \n \n handleProductChange(\"ExciseRate\", e.target.value)\n }\n value={product.ExciseRate}\n size=\"sm\"\n />\n \n \n \n handleProductChange(\"ExciseSum\", e.target.value)\n }\n value={product.ExciseSum}\n size=\"sm\"\n disabled={properties.isAutoCalc}\n />\n \n \n )}\n \n \n handleProductChange(\"DeliverySum\", e.target.value)\n }\n value={product.DeliverySum}\n size=\"sm\"\n disabled={properties.isAutoCalc}\n />\n \n\n {hasVat && (\n <>\n \n \n handleProductChange(\"VatRate\", e.target.value)\n }\n value={product.VatRate}\n size=\"sm\"\n disabled={!vatEditable}\n />\n \n \n \n handleProductChange(\"VatSum\", e.target.value)\n }\n value={product.VatSum}\n size=\"sm\"\n disabled={properties.isAutoCalc}\n />\n \n \n \n handleProductChange(\"DeliverySumWithVat\", e.target.value)\n }\n value={product.DeliverySumWithVat}\n size=\"sm\"\n disabled={properties.isAutoCalc}\n />\n \n \n )}\n {properties.isPrivileged && (\n <>\n \n \n\n setTooltip(!tooltip)}\n >\n {privileges?.find((p) => p?.id == product.LgotaId)?.ns72_name ||\n \"Выберите льготу\"}\n \n\n \n handleProductChange(\"LgotaId\", e.target.value)\n }\n >\n \n {privileges.map((elem) => (\n \n {elem.name}\n \n ))}\n \n \n\n \n \n handleProductChange(\"LgotaName\", e.target.value)\n }\n value={product.LgotaName}\n size=\"sm\"\n label=\"Название льготы\"\n title=\"Название льготы\"\n />\n \n \n \n handleProductChange(\"LgotaVatSum\", +e.target.value)\n }\n value={(product.DeliverySum * product.VatRate) / 100}\n size=\"sm\"\n disabled\n label=\"Льготная сумма\"\n title=\"Льготная сумма\"\n />\n \n \n {\n handleProductChange(\"LgotaType\", +e.target.value);\n }}\n value={product.LgotaType || undefined}\n label=\"Тип льготы\"\n title=\"Тип льготы\"\n >\n {[\n { id: 1, label: \"Льгота по НДС\" },\n { id: 2, label: \"Льгота по налогу\" },\n ].map((type) => (\n \n ))}\n \n \n \n )}\n\n setModal(!modal)}>\n \n \n \n {(product.OrdNo !== 1 || products.length > 1) && (\n deleteProduct(products, product, setProducts)}\n >\n \n \n )}\n \n \n setModal(!modal)}\n >\n setModal(!modal)}>\n Маркировка\n \n \n
\n
\n

Потребителская упаковка

\n\n {product?.Marks?.KIZ?.map((el, i) => (\n \n handleMarksChange(\"KIZ\", i, e.target.value)\n }\n />\n ))}\n\n
\n addMarks(\"KIZ\", false)}\n >\n \n
\n addMarks(\"KIZ\", true)}\n >\n \n
\n
\n \n
\n

Групповая упаковка

\n\n {product?.Marks?.NomUpak.map((el, i) => (\n \n handleMarksChange(\"NomUpak\", i, e.target.value)\n }\n />\n ))}\n\n
\n addMarks(\"NomUpak\", false)}\n >\n \n
\n addMarks(\"NomUpak\", true)}\n >\n \n
\n \n \n
\n

Транспортная упаковка

\n\n {product?.Marks?.IdentTransUpak.map((el, i) => (\n \n handleMarksChange(\"IdentTransUpak\", i, e.target.value)\n }\n />\n ))}\n\n
\n addMarks(\"IdentTransUpak\", false)}\n >\n \n
\n addMarks(\"IdentTransUpak\", true)}\n >\n \n
\n \n \n \n
\n \n \n );\n}\nexport default SingleProductRow;\n\nconst searchableSelectStyles = {\n control: (provided) => ({\n ...provided,\n minHeight: 0,\n maxHeight: \"32px\",\n }),\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".6875rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n }),\n placeholder: (provided) => ({\n ...provided,\n top: \"40%\",\n }),\n};\n\nfunction validate(num) {\n if (num.length && num.includes(\",\")) return false;\n return typeof parseFloat(num) == \"number\";\n}\n\n//@ts-ignore;\nasync function writeVatData(\n tinCommittent: string,\n setTinAlert = false as any,\n facturaDate,\n profile\n) {\n if (tinCommittent.length === 9) {\n const response = await Company.isCommitent({\n companyTin: profile.pinfl ? profile.pinfl : profile.tin,\n searchTin: tinCommittent,\n date: facturaDate,\n });\n\n if (!response && !(response as any).result.success) {\n notify(\n \"Указанный вами ИНН не является вашим комитентом: ИНН \" + tinCommittent,\n \"error\"\n );\n return { regCode: \"\", name: \"\" };\n }\n\n if (setTinAlert && +tinCommittent === 201122919) setTinAlert(true);\n\n const info = await Company.fetchInfo(tinCommittent, facturaDate);\n\n return {\n regCode: info.VatRegCode,\n name: info.Name,\n regCodeStatus: info.VatRegStatus,\n };\n }\n}\n","import { useMemo, useRef, useState, useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button } from \"shards-react\";\nimport SingleProductRow from \"./SingleProductRow/index\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { ExcelRenderer } from \"react-excel-renderer\";\nimport { toast } from \"react-toastify\";\nimport { toCurrency } from \"../../../utils/helpers\";\nimport { prodDef } from \"./constants\";\nimport { notifyError } from \"../../../utils/helpers/toast\";\nimport { FacturaProduct, FacturaType } from \"../../../utils/models/actTypes\";\nimport Company from \"@api/Company\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport useFacturaContext from \"@hooks/Factura/useFacturaContext\";\nimport { MarkType, PrivilegyType } from \"@models/CompanyTypes\";\n\nconst array = [\n \"№№\",\n \"Код\",\n \"Товар\",\n \"Ед.изм\",\n \"КОЛ-ВО\",\n \"Цена\",\n \"Сумма\",\n \"Остаток\",\n \"НДС %\",\n \"НДС сумма\",\n \"Сумма с НДС\",\n];\n\ntype PropsType = {\n products: FacturaProduct[];\n setProducts: React.Dispatch>;\n factura: FacturaType;\n};\n\nfunction ProductList(props: PropsType) {\n const { products, setProducts, factura } = props;\n\n const {\n HasCommittent: hasCommittent,\n HasMedical: hasMedical,\n HasExcise: hasExcise,\n HasVat: hasVat,\n } = factura.ProductList;\n\n const dispatch = useDispatch();\n const ref = useRef(null);\n\n const { profile } = useAuth();\n const { properties, onPropertiesChange } = useFacturaContext();\n\n const [type, setType] = useState(\"\");\n const [cods, setCods] = useState([]);\n\n const [privileges, setPriveleges] = useState([]);\n\n const fileHandler = (event) => {\n let fileObj = event.target.files[0];\n\n if (fileObj) {\n ExcelRenderer(fileObj, (err, resp) => {\n if (err) console.log(err);\n else {\n const values = resp.rows;\n values[0].forEach((el, i) => {\n if (array[i] !== el) {\n toast.error(\"Неверный тип файла\");\n return;\n }\n });\n\n let newProducts: FacturaProduct[] = [];\n for (let i = 0; i < values.length; i++) {\n if (i === 0 || i === values.length - 1) continue;\n newProducts.push({\n ...prodDef,\n OrdNo: i,\n Name: String(values[i][2]),\n Count: +(type + String(values[i][4])),\n Summa: +String(values[i][5]),\n DeliverySum: +(type + String(values[i][6])),\n VatRate: +String(values[i][8]),\n VatSum: +(type + String(values[i][9])),\n DeliverySumWithVat: +(type + String(values[i][10])),\n CatalogCode: \"9990019656\",\n CatalogName: \"Салаты мясные охлажденные\",\n });\n }\n setProducts(newProducts);\n }\n });\n } else {\n toast.error(\"Неверный тип файла\");\n }\n };\n\n useEffect(() => {\n Company.fetchSettnigs()\n .then((settings) => {\n const setting = settings.find(\n (setting) => setting.setting === \"privilege\"\n );\n setting && onPropertiesChange(\"isPrivileged\", setting.value);\n })\n .catch(notifyError);\n }, []);\n\n const total = useMemo(() => {\n return products.reduce(\n (a, b) => {\n return {\n DeliverySum: a.DeliverySum + Number(b.DeliverySum),\n DeliverySumWithVat:\n a.DeliverySumWithVat + Number(b.DeliverySumWithVat),\n VatSum: a.VatSum + Number(b.VatSum),\n };\n },\n { DeliverySum: 0, DeliverySumWithVat: 0, VatSum: 0 }\n );\n }, [products]);\n\n useEffect(() => {\n if (cods.length === 0) {\n Company.fetchTotalMarks(profile.tin)\n .then((res) => setCods(res.data))\n .catch(notifyError);\n }\n\n if (properties.isPrivileged) {\n Company.fetchPrivilegies().then(setPriveleges).catch(notifyError);\n }\n }, [properties.isPrivileged]);\n\n return (\n <>\n \n \n \n \n #\n \n {hasCommittent && (\n \n Данные коммитента\n \n )}\n\n \n Код ЕЭК\n \n \n Название ЕЭК\n \n \n Штрих код\n \n \n Наименование\n \n {hasMedical ? (\n <>\n \n Серия товара\n \n \n Ед.Измер\n \n \n Базовая Цена\n \n \n % добавочной стоимости\n \n \n ) : (\n \n Ед.Измер\n \n )}\n \n Упаковка\n \n \n Кол-во\n \n \n Цена\n \n {hasExcise && (\n \n Акциз\n \n )}\n \n Стоимость поставки\n \n {hasVat ? (\n <>\n \n НДС\n \n \n Стоимость поставки с учетом НДС\n \n \n ) : null}\n {properties.isPrivileged && (\n \n Льготы\n \n )}\n \n \n \n \n {hasCommittent && (\n <>\n \n Наименование\n \n \n Инн\n \n \n Рег. номер НДС\n \n \n )}\n\n {hasExcise && (\n <>\n \n Ставка\n \n \n Сумма\n \n \n )}\n\n {hasVat && (\n <>\n \n Ставка\n \n \n Сумм\n \n \n )}\n \n \n \n {products.map((el, i) => (\n \n ))}\n\n \n \n \n \n {hasVat && (\n <>\n \n \n \n \n )}\n \n \n \n \n
Итого: {toCurrency(total.DeliverySum)} сум{toCurrency(total.VatSum)} сум{toCurrency(total.DeliverySumWithVat)} сум
\n\n
\n {\n setProducts([\n ...products,\n {\n ...prodDef,\n OrdNo: products.length + 1,\n },\n ]);\n dispatch(docCreateActions.changedDocCreateForm(true));\n }}\n >\n Добавить\n \n setProducts([{ ...prodDef }])}\n >\n Удалить все\n \n\n {(+profile.tin === 302073690 ||\n +profile.tin === 305933654 ||\n +profile.tin === 306851622) && (\n <>\n {\n setType(\"\");\n (ref.current as any).click();\n }}\n >\n Импортировать документ\n \n {\n setType(\"-\");\n (ref.current as any).click();\n }}\n >\n Импортировать документ -\n \n \n )}\n\n \n
\n \n );\n}\nexport default ProductList;\n","export const facturaTypes = [\n \"Стандартная\",\n \"Дополнительная\",\n \"Возмещение расходов\",\n \"Без оплаты\",\n \"Исправленный\",\n \"Исправленный (возмещение затрат)\",\n];\n\nexport const singleSidedTypes = [\n \"На физ. лицо\",\n \"На экспорт\",\n \"На импорт\",\n \"Реализация, связанная с гос. секретом\",\n \"Финансовые услуги\",\n \"Реализация ниже рыночной стоимости\",\n \"Реализация ниже таможенной стоимости\",\n \"Экспорт услуг (на территории Республики Узбекистан)\",\n \"Прочие доходы\",\n \"Подача подакцизных товаров на переработку\",\n \"Использование подакцизных товаров для собственных нужд\",\n \"Разница между ценой и себестоимостью подакцизных товаров\",\n \"Потери и порча подакцизных товаров\",\n];\n\nexport const otherIncomes = [\n \"Доходы по долгосрочным контрактам\",\n \"Доходы по операциям РЕПО\",\n \"Доходы по операциям ценных бумаг и (или) финансовым инструментам срочных сделок\",\n \"Доходы от выбытия основных средств и иного имущества\",\n \"Безвозмездно полученное имущество (полученные услуги)\",\n \"Доходы в виде стоимости излишков товарно-материальных запасов и прочего имущества, выявленных в результате инвентаризации\",\n \"Доходы от списания обязательств в порядке, установленном законодательством\",\n \"Доходы, полученные по договору уступки права требования\",\n \"Доходы в виде возмещения ранее вычтенных расходов или убытков\",\n \"Штрафы, пени и иные санкции за нарушение договорных обязательств, а также суммы возмещения убытков (ущерба)\",\n \"Превышение положительной курсовой разницы над отрицательной по валютным счетам\",\n \"Суммы восстановленных расходов\",\n \"Доходы, полученные в связи с уменьшением уставного фонда (уставного капитала) юридического лица, в случае отказа акционера, участника от получения стоимости своей доли (части доли) в пользу\",\n \"этого юридического лица\",\n \"Доходы в виде прибыли контролируемой иностранной компании в случаях и в порядке, установленных разделом VII Налогового кодекса\",\n \"Дивиденды\",\n \"Проценты\",\n \"Прочие доходы\",\n];\n\nexport const incomeTypes = [\n \"Стоимость переданных товаров (услуг) участнику при его выходе из состава участников или при уменьшении доли участия, либо выкупе юридическим лицом у участника доли участия\",\n \"Стоимость переданных товаров (услуг) акционеру при выкупе юридическим лицом, также при ликвидации юридического лица - эмитентом у акционера акций, выпущенных этим эмитентом\",\n \"Передача товаров (услуг) в счет оплаты труда физических лиц или выплаты дивидендов\",\n \"Передача товаров и иного имущества на давальческой основе\",\n \"Стоимость ваучеров, предоставляющих право на получение реализованных или безвозмездно переданных товаров (услуг)\",\n \"Стоимость реализованных основных средств и другого имущества\",\n \"Доходы от продажи предприятия как имущественного комплекса\",\n];\n","import { FC } from \"react\";\nimport { Col, FormSelect } from \"shards-react\";\n\nconst IncomeTypeSelect: FC = (props) => {\n const { types, onChange } = props;\n\n return (\n \n \n \n {types.map((type: string, index: number) => (\n \n ))}\n \n \n );\n};\n\nexport default IncomeTypeSelect;\n","import { Col, Row, FormInput } from \"shards-react\";\nimport { FC, useEffect, useState } from \"react\";\nimport { searchableSelectStyles } from \"./Factura\";\nimport BaseSelect from \"../../../common/BaseSelect\";\nimport CommonApi from \"@api/CommonApi\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport { SelectOptionType } from \"@models\";\n\ntype IProps = {\n factura: any;\n onFormChanged: (obj: any) => void;\n};\n\nconst ForImport: FC = (props) => {\n const { factura, onFormChanged } = props;\n\n const [countries, setCountries] = useState([]);\n\n const onSelectChanged = (inputVal: any) => {\n onFormChanged({\n ...factura,\n ForeignCompany: {\n ...factura.ForeignCompany,\n CountryId: inputVal.value,\n },\n });\n };\n\n useEffect(() => {\n CommonApi.fetchCountries()\n .then((countries) => {\n setCountries(\n countries.map((country) => ({\n value: country.countryId,\n label: country.name,\n }))\n );\n })\n .catch(notifyError);\n }, []);\n\n return (\n \n \n \n
\n \n \n \n \n
Иностранная компания
\n \n \n \n \n \n \n onFormChanged({\n ...factura,\n ForeignCompany: {\n ...factura.ForeignCompany,\n Name: e.target.value,\n },\n })\n }\n />\n \n \n \n onFormChanged({\n ...factura,\n ForeignCompany: {\n ...factura.ForeignCompany,\n Address: e.target.value,\n },\n })\n }\n />\n \n \n \n \n \n onFormChanged({\n ...factura,\n ForeignCompany: {\n ...factura.ForeignCompany,\n Bank: e.target.value,\n },\n })\n }\n />\n \n \n \n onFormChanged({\n ...factura,\n ForeignCompany: {\n ...factura.ForeignCompany,\n Account: e.target.value,\n },\n })\n }\n />\n \n \n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default ForImport;\n","import { FC } from \"react\";\nimport { Col, Row, FormInput, DatePicker } from \"shards-react\";\nimport { dateF } from \"../../../../utils/helpers\";\n\ntype IProps = {\n factura: any;\n onFormChanged: (obj: any) => void;\n};\n\nconst PrevInvoiceData: FC = (props) => {\n const { factura, onFormChanged } = props;\n\n return (\n \n \n \n
\n \n \n \n \n
\n Данные прошлой счета-фактуры\n
\n \n \n \n onFormChanged({\n ...factura,\n OldFacturaDoc: {\n ...factura.OldFacturaDoc,\n OldFacturaId: e.target.value,\n },\n })\n }\n />\n \n \n \n onFormChanged({\n ...factura,\n OldFacturaDoc: {\n ...factura.OldFacturaDoc,\n OldFacturaNo: e.target.value,\n },\n })\n }\n />\n \n \n \n \n \n onFormChanged({\n ...factura,\n OldFacturaDoc: {\n ...factura.OldFacturaDoc,\n OldFacturaDate: dateF(date),\n },\n })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default PrevInvoiceData;\n","import { useMemo } from \"react\";\nimport useAuth from \"./Auth/useAuth\";\n\ntype ParamsType = {\n status?: number;\n};\n\nconst useRole = (params: ParamsType = {}) => {\n const { profile } = useAuth();\n const status = parseInt(String(profile?.status ?? params?.status));\n\n const roles = useMemo(\n () => ({\n isVatPayerPlus: status === 30,\n isIndividual: status === 60,\n isVatPayerActive: status === 20,\n isVatPayerExpired: status === 21,\n isVatPayerSuspended: status === 22,\n }),\n [status]\n );\n\n const updatedRoles = {\n ...roles,\n isUnknown: Object.values(roles).every((role) => !role),\n };\n\n return updatedRoles;\n};\n\nexport default useRole;\n","import { Modal, ModalHeader, ModalBody, Button } from \"shards-react\";\nimport styled from \"styled-components\";\n\ntype PropsType = {\n onClose: Function;\n onCancel: Function;\n};\n\nconst TinAlertModal = (props: PropsType) => {\n const { onClose, onCancel } = props;\n\n const handleClose = () => {\n onClose();\n };\n\n const handleCancel = () => {\n onCancel();\n handleClose();\n };\n\n return (\n \n \n
Возможно Вы указали неверный ИНН
\n
\n \n
\n Указанный Вами ИНН (201122919) является ИНН Министерства финансов\n Республики Узбекистан. Если вы не отправляете счёт-фактуру в\n Министерство финансов Республики Узбекистан, укажите, пожалуйста, ИНН\n соответствующей бюджетной организации.\n
\n
\n
\n \n \n
\n
\n
\n );\n};\n\nexport default TinAlertModal;\n\nconst Center = styled.p`\n text-align: center;\n`;\n","import { ActTypes } from \"@models/actTypes\";\n\ntype InfoType = {\n document: any;\n type: ActTypes;\n id: string;\n};\n\nexport const transformDocument = (info: InfoType) => {\n let { document, type, id } = info;\n\n switch (type) {\n case \"Фактура\": {\n document = {\n ...document,\n SingleSidedType: document.BuyerTin\n ? 0\n : !document.SingleSidedType\n ? 1\n : document.SingleSidedType,\n FacturaId: id,\n ProductList: { ...document.ProductList, FacturaProductId: id },\n FacturaEmpowermentDoc: {\n ...document.FacturaEmpowermentDoc,\n AgentFacturaId: id,\n },\n };\n break;\n }\n\n case \"Доверенность\": {\n document = {\n ...document,\n EmpowermentId: id,\n ProductList: { ...document.ProductList, EmpowermentProductId: id },\n Agent: { ...document.Agent, AgentEmpowermentId: id },\n };\n break;\n }\n\n case \"Акт\": {\n document = {\n ...document,\n ActId: id,\n ProductList: { ...document.ProductList, ActProductId: id },\n };\n break;\n }\n\n case \"Договор\": {\n document = {\n ...document,\n ContractId: id,\n };\n\n break;\n }\n\n case \"Акт сверки\": {\n document = {\n ...document,\n VerificationActId: id,\n };\n break;\n }\n\n case \"PDF\": {\n document = { ...document, Id: id };\n break;\n }\n\n case \"HTML\": {\n const { content } = document;\n document = {\n ...document,\n Id: id,\n Data: content,\n meta: { doc: id, docType: \"HTML\", receiver: document.RecieverTin },\n };\n break;\n }\n }\n\n return document;\n};\n","import DocumentApi from \"@api/Document\";\nimport { ActTypes } from \"@models/actTypes\";\nimport { FilteredDocType } from \"@models/DocumentTypes\";\nimport { docCreateActions, docsTableActions, isLoadingFireActions } from \"@redux/actions\";\nimport { Dispatch } from \"@reduxjs/toolkit\";\nimport { transformDocument } from \"@utils/helpers/document\";\nimport { notify } from \"@utils/helpers/toast\";\n\nexport const deleteDraftThunk = (id: string) => async (dispatch: Dispatch) => {\n try {\n dispatch(isLoadingFireActions.dispatchIsLoadingPending)\n await DocumentApi.delete(id); dispatch(isLoadingFireActions.dispatchIsLoadingSuccess)\n } catch {\n dispatch(isLoadingFireActions.dispatchIsLoadingError)\n } finally {\n dispatch(docsTableActions.setNeedToReload(true));\n }\n}\n\nexport const bulkSendThunk = (drafts: FilteredDocType[]) => async (dispatch: Dispatch) => {\n dispatch(isLoadingFireActions.dispatchIsLoadingPending)\n\n const rejectedDrafts: FilteredDocType[] = []\n\n const draftsPromised = drafts.map(async (draft) => {\n try {\n const info = await DocumentApi.fetchInfo(draft.id)\n\n await DocumentApi.send({\n id: draft.id, type: draft.docType, info: info.contents\n })\n } catch {\n rejectedDrafts.push(draft)\n }\n })\n\n await Promise.allSettled(draftsPromised);\n\n notify(\"Отправка завершена\", \"success\");\n\n dispatch(docsTableActions.setNeedToReload(true));\n\n dispatch(isLoadingFireActions.dispatchIsLoadingSuccess);\n\n return rejectedDrafts\n}\n\n\nexport const sendDocumentThunk = (document: any, type: ActTypes, id?: string) => async (dispatch: Dispatch) => {\n try {\n dispatch(isLoadingFireActions.dispatchIsLoadingPending);\n\n if (typeof id === 'undefined')\n id = await DocumentApi.fetchId().catch(() => {\n throw Error('Не удалось получить ID для документа')\n })\n\n const doc = transformDocument({ document, type, id })\n\n await DocumentApi.send({ info: doc, id, type }).catch(() => {\n throw Error(\"Не удалось отправить документ\")\n })\n\n dispatch(isLoadingFireActions.dispatchIsLoadingSuccess)\n dispatch(docCreateActions.changedDocCreateForm(false));\n } catch (error) {\n notify(error.message, \"warning\");\n dispatch(isLoadingFireActions.dispatchIsLoadingError)\n }\n}\n\nexport const saveDocumentThunk = (document: any, type: ActTypes, id?: string) => async (dispatch: Dispatch) => {\n try {\n dispatch(isLoadingFireActions.dispatchIsLoadingPending);\n\n if (typeof id === 'undefined')\n id = await DocumentApi.fetchId().catch(() => {\n throw Error('Не удалось получить ID для документа')\n })\n\n const doc = transformDocument({ document, type, id })\n\n await DocumentApi.saveDraft({ info: doc, id, type }).catch(() => {\n throw Error(\"Документ не удалось сохранить\")\n })\n\n notify('Документ успешно сохранен', 'info')\n\n dispatch(isLoadingFireActions.dispatchIsLoadingSuccess)\n dispatch(docCreateActions.changedDocCreateForm(false));\n } catch (error) {\n notify(error.message, \"warning\");\n dispatch(isLoadingFireActions.dispatchIsLoadingError)\n }\n}","import Company from \"@api/Company\";\nimport {\n alcoholTabacoCompanies,\n facturaDef,\n facturaVatRegStatuses,\n personDef,\n prodDef,\n} from \"@components/CreateDoc/factura/constants\";\nimport { StatusKeys } from \"@models\";\nimport { FacturaProduct, FacturaType } from \"@models/actTypes\";\nimport { FactoredInfoType } from \"@models/CompanyTypes\";\nimport { FacturaTypes, VatRegStatuses } from \"@utils/constants/docs/factura\";\nimport moment from \"moment\";\nimport { dateF, deepClone } from \"../helpers\";\n\nexport const facturaToAct = (\n factura: FacturaType,\n sellerInfo: FactoredInfoType\n) => {\n return {\n ActDoc: {\n ActNo: factura.FacturaDoc.FacturaNo,\n ActDate: factura.FacturaDoc.FacturaDate,\n ActText: \"\",\n },\n ContractDoc: {\n ContractNo: factura.ContractDoc.ContractNo,\n ContractDate: factura.ContractDoc.ContractDate,\n },\n SellerTin: sellerInfo.Tin,\n SellerName: sellerInfo.Name,\n SellerAddress: sellerInfo.Address,\n BuyerTin: factura.BuyerTin,\n BuyerName: factura?.Buyer?.Name,\n BuyerAddress: factura?.Buyer?.Address,\n ProductList: {\n ActProductId: \"\",\n Tin: sellerInfo.Tin,\n Products: factura.ProductList.Products.map((product) => ({\n OrdNo: product.OrdNo,\n Name: product.Name,\n MeasureId: product.MeasureId,\n Count: product.Count,\n Summa: product.Summa,\n TotalSum: product.DeliverySum,\n })),\n },\n };\n};\n\nexport const infoToFactura = (info: FactoredInfoType): FacturaType => {\n return {\n ...facturaDef,\n FacturaDoc: {\n FacturaNo: \"\",\n FacturaDate: dateF(new Date()),\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n FacturaEmpowermentDoc: {\n AgentFacturaId: \"\",\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n AgentFio: \"\",\n AgentPinfl: \"\",\n },\n SellerTin: info.IsPhis ? info.Pinfl : info.Tin,\n\n Seller: {\n Name: info.Name,\n Account: info.Account,\n BankId: info.BankId,\n Address: info.Address,\n Mobile: info.Mobile,\n WorkPhone: info.WorkPhone,\n Oked: info.Oked,\n DistrictId: info.DistrictId,\n Director: info.Director,\n Accountant: info.Accountant,\n VatRegCode: info.VatRegCode,\n BranchCode: \"\",\n BranchName: \"\",\n VatRegStatus: info.VatRegStatus,\n TaxGap: info.TaxGap,\n },\n ProductList: {\n FacturaProductId: \"\",\n Tin: info.IsPhis ? info.Pinfl : info.Tin,\n HasExcise: false,\n HasCommittent: false,\n HasMedical: false,\n HasVat: false,\n HideReportCommittent: false,\n Products: [prodDef],\n },\n };\n};\n\nexport const facturaCleanup = (oldFactura: FacturaType) => {\n const factura = deepClone(oldFactura);\n\n const hasMarking = factura.ProductList.Products.some(\n (product) => product?.Marks?.ProductType\n );\n\n if (!hasMarking) {\n delete factura.HasMarking;\n\n factura.ProductList.Products = factura.ProductList.Products.map(\n ({ Marks, ...product }) => product\n );\n }\n\n if (factura.WaybillId === \"\") delete factura.WaybillId;\n\n factura.ProductList.Products = factura.ProductList.Products.map((product) => {\n for (const key in product) {\n if (\n product[key] === \"\" &&\n (key === \"MeasureId\" || key === \"PackageCode\" || key === \"PackageName\")\n )\n delete product[key];\n }\n\n return product;\n }).map((product) => {\n if (product.LgotaId) {\n return { ...product, LgotaVatSum: product.DeliverySum * product.VatRate };\n }\n\n return product;\n });\n\n if (factura.Buyer)\n factura.Buyer.VatRegStatus = facturaVatRegStatuses[\n factura.Buyer.VatRegStatus!\n ] as StatusKeys;\n factura.Seller.VatRegStatus = facturaVatRegStatuses[\n factura.Seller.VatRegStatus!\n ] as StatusKeys;\n\n return factura;\n};\n\nexport const getFacturaErrors = (\n factura: FacturaType,\n products: FacturaProduct[]\n) => {\n const errors: string[] = [];\n\n const isSellerInvalid =\n factura.Seller.VatRegStatus === VatRegStatuses.InactiveTemp ||\n factura.Seller.VatRegStatus === VatRegStatuses.Inactive;\n const isBuyerInvalid =\n factura.Buyer?.VatRegStatus === VatRegStatuses.InactiveTemp ||\n factura.Buyer?.VatRegStatus === VatRegStatuses.Inactive;\n\n if (isSellerInvalid)\n errors.push(\n \"Продавец не может отправлять фактуру за этот период (статус не активный)\"\n );\n if (isBuyerInvalid)\n errors.push(\n \"Покупатель не может принимать фактуру за этот период (статус не активный)\"\n );\n\n // checking for marks for alcoholTobakoCompanies\n const rowsWOKIZ = alcoholTabacoCompanies.find(\n (el) => el === factura.SellerTin\n );\n\n if (rowsWOKIZ)\n products.forEach((el) => {\n if (!el.Marks?.KIZ?.length)\n errors.push(\"Не указаны маркировки для товара \" + el.Name);\n });\n\n // checking for mandatory fields\n\n if (!factura.FacturaDoc?.FacturaNo) errors.push(\"Не заполнен номер фактуры\");\n\n const facturaType = factura.FacturaType;\n\n const hasInvoiceData =\n facturaType === FacturaTypes.Additional ||\n facturaType === FacturaTypes.Corrected ||\n facturaType === FacturaTypes.CompensationCorrected;\n\n if (\n hasInvoiceData &&\n !(factura.OldFacturaDoc?.OldFacturaId && factura.OldFacturaDoc.OldFacturaNo)\n )\n errors.push(\"Неверно заполнены данные старой фактуры\");\n\n if (!factura.ContractDoc?.ContractNo)\n errors.push(\"Не заполнен номер договора\");\n //if (!factura.BuyerTin&&!factura.SingleSidedType) errors.push(\"Не заполнены данные покупателя\");\n\n products.forEach((row) => {\n if (row.CommittentTin && (!row.CommittentName || row.CommittentVatRegCode))\n errors.push(\"Некорректно заполнены данные о коммитентах\");\n\n if (!row.Name) errors.push(\"Не заполнено наименование товара\");\n\n if (!row.CatalogCode) errors.push(\"Не заполнен код ИКПУ\");\n });\n\n return errors;\n};\n\nexport const ProductValuesToFixed = (\n products: FacturaProduct[]\n): FacturaProduct[] => {\n return products.map((product) => {\n return {\n ...product,\n BaseSumma: product.BaseSumma\n ? +parseFloat(String(product.BaseSumma)).toFixed(2)\n : 0,\n Summa: +parseFloat(String(product.Summa)).toFixed(2),\n Count: +parseFloat(String(product.Count)).toFixed(4),\n DeliverySum: +parseFloat(String(product.DeliverySum)).toFixed(2),\n VatSum: +parseFloat(String(product.VatSum)).toFixed(2),\n DeliverySumWithVat: +parseFloat(\n String(product.DeliverySumWithVat)\n ).toFixed(2),\n ExciseSum: +parseFloat(String(product.ExciseSum)).toFixed(2),\n VatRate: +parseFloat(String(product.VatRate)).toFixed(2),\n ExciseRate: +parseFloat(String(product.ExciseRate)).toFixed(2),\n ProfitRate: product.ProfitRate\n ? +parseFloat(String(product.ProfitRate)).toFixed(2)\n : 0,\n };\n });\n};\n\nexport const fetchBuyerInfo = async (\n tin: string,\n date: string,\n isAlertable?: boolean\n) => {\n if (tin.length !== 9 && tin.length !== 14) return personDef;\n\n if (isAlertable && +tin === 201122919) {\n throw Error(\"Гос\");\n }\n\n const formatedDate = moment(date).format(\"DD.MM.YYYY\");\n\n try {\n const info = await Company.fetchInfo(tin, formatedDate);\n\n const buyerObj: FacturaType[\"Buyer\"] = {\n ...info,\n BranchCode: \"\",\n BranchName: \"\",\n };\n\n return buyerObj;\n } catch {\n return personDef;\n }\n};\n","import { FacturaType } from \"@models/actTypes\";\nimport { FacturaTypes } from \"@utils/constants/docs/factura\";\nimport { Col, FormSelect } from \"shards-react\";\nimport { facturaTypes } from \"./Factura/selectTypes\";\n\ntype PropsType = {\n factura: FacturaType;\n onFacturaChange: (factura: FacturaType) => void;\n};\n\nconst Types = (props: PropsType) => {\n const { factura, onFacturaChange } = props;\n\n const hanldeFacturaChange = (factura: FacturaType) => {\n onFacturaChange(factura);\n };\n\n return (\n \n {\n const facturaType = +e.target.value;\n\n let newObj = {\n ...factura,\n FacturaType: facturaType,\n };\n\n if (facturaType !== FacturaTypes.Additional) {\n newObj = {\n ...newObj,\n OldFacturaDoc: {\n ...newObj.OldFacturaDoc,\n OldFacturaId: \"\",\n OldFacturaDate: \"\",\n OldFacturaNo: \"\",\n },\n };\n }\n\n hanldeFacturaChange(newObj);\n }}\n >\n {facturaTypes.map((facturaType, index) => (\n \n {facturaType}\n \n ))}\n \n \n );\n};\n\nexport default Types;\n","import { FacturaType } from \"@models/actTypes\";\nimport { FacturaSingleTypes } from \"@utils/constants/docs/factura\";\nimport { Col, FormSelect } from \"shards-react\";\nimport { singleSidedTypes } from \"./Factura/selectTypes\";\n\ntype PropsType = {\n factura: FacturaType;\n onFacturaChange: (factura: FacturaType) => void;\n};\n\nconst OneSidedSelect = (props: PropsType) => {\n const { factura, onFacturaChange } = props;\n\n const hanldeFacturaChange = (factura: FacturaType) => {\n onFacturaChange(factura);\n };\n\n return (\n \n {\n const type = +e.target.value;\n\n const newFactura = {\n ...factura,\n SingleSidedType: type,\n };\n\n if (type !== FacturaSingleTypes.Import) {\n newFactura.ForeignCompany = {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n };\n }\n\n hanldeFacturaChange(newFactura);\n }}\n >\n {singleSidedTypes.map((type, index) => (\n \n {type}\n \n ))}\n \n \n );\n};\n\nexport default OneSidedSelect;\n","import { useCallback, useRef } from \"react\";\n\nconst useDebounceFn = (callback: (...args: any[]) => void, delay: number) => {\n const timer = useRef>();\n\n const debouncedCallback = useCallback(\n (...args) => {\n if (timer.current) clearTimeout(timer.current);\n\n timer.current = setTimeout(() => {\n callback(...args);\n }, delay);\n },\n [callback, delay]\n );\n\n return debouncedCallback;\n};\n\nexport default useDebounceFn;\n","import Company from \"@api/Company\";\nimport { useDispatch } from \"@hooks\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport useFacturaContext from \"@hooks/Factura/useFacturaContext\";\nimport useDebounceFn from \"@hooks/useDebounceFn\";\nimport { SetState } from \"@models\";\nimport { FacturaProduct, FacturaType } from \"@models/actTypes\";\nimport { docCreateActions } from \"@redux/actions\";\nimport { dateF, getCasedObject } from \"@utils/helpers\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport moment from \"moment\";\nimport { useState } from \"react\";\nimport {\n Col,\n Row,\n FormInput,\n DatePicker,\n FormCheckbox,\n Form,\n FormGroup,\n Button,\n} from \"shards-react\";\nimport { prodDef } from \"./constants\";\n\ntype PropsType = {\n factura: FacturaType;\n setFactura: SetState;\n onFacturaChange: (factura: FacturaType) => void;\n products: FacturaProduct[];\n setProducts: SetState;\n};\n\nconst FacturaInfo = (props: PropsType) => {\n const { factura, setFactura, onFacturaChange, products, setProducts } = props;\n\n const dispatch = useDispatch();\n\n const { profile } = useAuth();\n const { properties } = useFacturaContext();\n\n const [isFilling, setIsFilling] = useState(false);\n\n const handleFacturaChange = (factura: FacturaType) => {\n onFacturaChange(factura);\n };\n\n const handleFacturaDateChange = (date: Date) => {\n dispatch(docCreateActions.changedDocCreateForm(true));\n\n const formattedDate = moment(date).format(\"DD.MM.YYYY\");\n\n if (factura?.BuyerTin?.length === 9) {\n Promise.all([\n Company.fetchVatRegCode(profile.tin, formattedDate),\n Company.fetchVatRegCode(factura.BuyerTin, formattedDate),\n ])\n .then(([sellerRes, buyerRes]) => {\n setFactura((prev) => ({\n ...prev,\n FacturaDoc: {\n ...prev.FacturaDoc,\n FacturaDate: dateF(date),\n },\n Seller: {\n ...prev.Seller,\n VatRegCode:\n sellerRes?.success && sellerRes.data.active\n ? sellerRes.data.vatRegCode!\n : \"\",\n },\n Buyer: {\n ...prev.Buyer!,\n VatRegCode:\n buyerRes?.success && buyerRes.data.active\n ? buyerRes.data.vatRegCode\n : \"\",\n },\n }));\n })\n .catch(notifyError);\n } else {\n Company.fetchVatRegCode(profile.tin, formattedDate)\n .then((sellerRes) => {\n setFactura((prev) => ({\n ...prev,\n FacturaDoc: {\n ...prev.FacturaDoc,\n FacturaDate: dateF(date),\n },\n Seller: {\n ...prev.Seller,\n VatRegCode:\n sellerRes.success && sellerRes.data.active\n ? sellerRes.data.vatRegCode\n : \"\",\n },\n }));\n })\n .catch(notifyError);\n }\n };\n\n const handleLotIdFetch = async (lotId) => {\n try {\n const exchangeInfo = await Company.fetchExchangeInfo(\n factura.BuyerTin,\n lotId\n );\n\n const exchangeProducts: FacturaProduct[] = exchangeInfo.products.map(\n (product, index) => {\n const {\n // ordNo,\n productName,\n count,\n summa,\n totalSum,\n planPositionId,\n productCode,\n productProperties,\n measureId,\n } = product;\n\n return {\n ...prodDef,\n OrdNo: products.length + index + 1,\n Name: productName,\n Count: count,\n Summa: summa,\n DeliverySum: totalSum,\n MeasureId: +measureId,\n ExchangeInfo: {\n ProductCode: productCode,\n ProductProperties: productProperties,\n PlanPositionId: String(planPositionId),\n },\n };\n }\n );\n\n if (isFilling) {\n setFactura((factura) => ({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n Products: factura.ProductList.Products.map((product) => ({\n ...product,\n ExchangeInfo: exchangeProducts[0].ExchangeInfo,\n })),\n },\n }));\n } else {\n setFactura((factura) => ({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n Products: [...factura.ProductList.Products, ...exchangeProducts],\n },\n }));\n\n setProducts((products) => [...products, ...exchangeProducts]);\n }\n } catch (err) {}\n };\n\n const debouncedLotIdFetch = useDebounceFn(handleLotIdFetch, 500);\n\n const handleLotIdChange = async (e: any) => {\n const value = e.target.value;\n\n handleFacturaChange({\n ...factura,\n LotId: value,\n });\n\n debouncedLotIdFetch(value);\n };\n\n const handleWaybillSubmit = async (e: React.FormEvent) => {\n try {\n e.preventDefault();\n\n if (!factura?.WaybillId) return;\n\n const isConfirmed = window.confirm(\n \"Данное действие заменит существующий список продуктов в СФ, вы уверены?\"\n );\n\n if (!isConfirmed) throw Error(\"Действие отменено.\");\n\n const response = await Company.fetchWaybill(\n profile.tin,\n factura.WaybillId\n );\n\n const products: FacturaProduct[] = response.products.map(\n (product, index) => ({\n ...getCasedObject(product, prodDef),\n DeliverySum: product.totalSum,\n OrdNo: index + 1,\n })\n );\n\n setFactura((factura) => ({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n Products: products,\n },\n }));\n\n setProducts(products);\n } catch (err) {\n notifyError(err);\n }\n };\n\n const handleFillingChange = () => {\n setIsFilling((isFilling) => !isFilling);\n };\n\n return (\n \n \n \n
\n \n \n \n \n
Счет-фактура
\n \n \n \n handleFacturaChange({\n ...factura,\n FacturaDoc: {\n ...factura.FacturaDoc,\n FacturaNo: e.target.value,\n },\n })\n }\n />\n \n \n \n \n \n {properties.isBudget && (\n \n \n
ID лота
\n \n \n \n
\n )}\n \n
\n \n \n
По договору
\n \n \n \n handleFacturaChange({\n ...factura,\n ContractDoc: {\n ...factura.ContractDoc,\n ContractNo: e.target.value,\n },\n })\n }\n />\n \n \n \n handleFacturaChange({\n ...factura,\n ContractDoc: {\n ...factura.ContractDoc,\n ContractDate: dateF(date),\n },\n })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n
\n\n \n
\n \n \n
\n \n handleFacturaChange({\n ...factura,\n WaybillId: e.target.value,\n })\n }\n autoComplete=\"off\"\n />\n \n
\n
\n
\n
\n\n \n \n \n handleFacturaChange({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n HasExcise: !factura.ProductList.HasExcise,\n },\n })\n }\n >\n Есть топливный акциз\n \n {\n handleFacturaChange({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n HasVat: !factura.ProductList.HasVat,\n },\n });\n }}\n >\n Есть НДС\n \n \n handleFacturaChange({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n HasCommittent: !factura.ProductList.HasCommittent,\n },\n })\n }\n >\n Есть коммитент\n \n {factura?.ProductList?.HasCommittent && (\n \n handleFacturaChange({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n HideReportCommittent:\n !factura.ProductList.HideReportCommittent,\n },\n })\n }\n >\n Исключить данный ЭСФ из отчёта по НДС.\n \n )}\n \n handleFacturaChange({\n ...factura,\n ProductList: {\n ...factura.ProductList,\n HasMedical: !factura.ProductList.HasMedical,\n },\n })\n }\n >\n Есть медицинские товары\n \n \n \n \n \n \n \n
Доверенность
\n \n \n \n handleFacturaChange({\n ...factura,\n FacturaEmpowermentDoc: {\n ...factura.FacturaEmpowermentDoc!,\n EmpowermentNo: e.target.value,\n },\n })\n }\n />\n \n \n \n handleFacturaChange({\n ...factura,\n FacturaEmpowermentDoc: {\n ...factura.FacturaEmpowermentDoc!,\n EmpowermentDateOfIssue: dateF(date),\n },\n })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n
\n \n \n \n \n
ПИНФЛ
\n \n writeInfoAgent(\n e.target.value,\n factura,\n handleFacturaChange\n )\n }\n />\n \n
\n \n \n
Ф.И.О
\n {\n handleFacturaChange({\n ...factura,\n FacturaEmpowermentDoc: {\n ...factura.FacturaEmpowermentDoc!,\n AgentFio: e.target.value,\n },\n });\n }}\n />\n \n
\n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default FacturaInfo;\n\nfunction writeInfoAgent(\n pinfl: string,\n factura: FacturaType,\n onFormChanged: (factura: FacturaType) => void\n) {\n if (pinfl.length !== 14) return;\n\n Company.fetchInfo(pinfl)\n .then((info) => {\n onFormChanged({\n ...factura,\n FacturaEmpowermentDoc: {\n ...factura.FacturaEmpowermentDoc!,\n AgentFio: info.Name,\n AgentPinfl: pinfl,\n },\n });\n })\n .catch(() => {\n onFormChanged({\n ...factura,\n FacturaEmpowermentDoc: {\n ...factura.FacturaEmpowermentDoc!,\n AgentFio: \"\",\n AgentPinfl: pinfl,\n },\n });\n });\n}\n","import { useState, useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Row, Col, FormInput, FormCheckbox, Card, CardHeader, CardBody, Button, Tooltip } from \"shards-react\";\nimport ProductList from \"../ProductList\";\nimport { deepClone, getCasedObject } from \"../../../../utils/helpers\";\nimport { docCreateActions } from \"../../../../redux/actions\";\nimport { getDocInfo } from \"../../../../redux/thunks\";\nimport { facturaDef, marksDef, personDef, prodDef } from \"../constants\";\nimport { notify, notifyError } from \"@utils/helpers/toast\";\nimport Select from \"react-select\";\nimport StatusBlock from \"../../../common/StatusBlock\";\nimport { incomeTypes, otherIncomes } from \"./selectTypes\";\nimport IncomeTypeSelect from \"./IncomeTypeSelect\";\nimport ForImport from \"./ForImport\";\nimport PrevInvoiceData from \"./PrevInvoiceData\";\nimport useRole from \"../../../../utils/hooks/useRole\";\nimport TinAlertModal from \"./TinAlertModal\";\nimport { useSelector } from \"../../../../utils/hooks\";\nimport { FacturaType } from \"../../../../utils/models/actTypes\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { FactoredInfoType } from \"@models/CompanyTypes\";\nimport { saveDocumentThunk, sendDocumentThunk } from \"@redux/thunks/documentThunks\";\nimport { FacturaSingleTypes, FacturaTypes } from \"@utils/constants/docs/factura\";\nimport {\n facturaCleanup,\n facturaToAct,\n fetchBuyerInfo,\n getFacturaErrors,\n infoToFactura,\n ProductValuesToFixed,\n} from \"@utils/helpers/document/factura\";\nimport Types from \"../Types\";\nimport OneSidedSelect from \"../OneSidedSelect\";\nimport FacturaInfo from \"../FacturaInfo\";\nimport useFacturaContext from \"@hooks/Factura/useFacturaContext\";\nimport { SelectOptionType } from \"@models\";\n\nconst Factura = (props) => {\n const { formChanged, docIsBeingCopied, docBeingCopiedId, docBeingCopiedData, docIsAdditional, docIsAdditionalType } =\n useSelector((state) => state.docCreateReducer);\n\n const dispatch = useDispatch();\n\n const { profile } = useAuth();\n const { isVatPayerPlus } = useRole();\n const { properties, onPropertiesChange } = useFacturaContext();\n\n const [sellerInfo, setSellerInfo] = useState(null);\n\n const [factura, setFactura] = useState(deepClone(facturaDef));\n\n const [products, setProducts] = useState([prodDef]);\n const [sellerBranches, setSellerBranches] = useState([]);\n const [buyerBranches, setBuyerBranches] = useState([]);\n\n const errors = getFacturaErrors(factura, products);\n\n const handleFacturaChange = (factura: FacturaType) => {\n !formChanged && dispatch(docCreateActions.changedDocCreateForm(true));\n setFactura(factura);\n };\n\n const handlePropertiesChange: typeof onPropertiesChange = (field, value) => {\n onPropertiesChange(field, value);\n };\n\n const handleTooltipToggle = () => {\n handlePropertiesChange(\"isTooltipOpen\", (isOpen) => !isOpen);\n };\n\n const handleIncomeTypeSelect = (e: any) => {\n const newFactura = { ...factura, IncomeType: +e.target.value };\n handleFacturaChange(newFactura);\n };\n\n const handleTinAlertOpen = () => {\n handlePropertiesChange(\"isTinAlertShown\", true);\n };\n\n const handleTinAlertClose = () => {\n handlePropertiesChange(\"isTinAlertShown\", false);\n };\n\n const handleTinAlertCancel = async () => {\n const info = fetchBuyerInfo(\"\", new Date().toISOString());\n\n setFactura((factura) => ({ ...factura, ...info }));\n };\n\n const handleFacturaInit = async () => {\n try {\n const info = await Company.fetchInfo(profile.tin);\n\n const branches = await Company.fetchBranches(info.Tin);\n\n setSellerInfo(info);\n\n setSellerBranches(\n branches.map((branch) => ({\n value: branch.branchNum,\n label: branch.branchName,\n }))\n );\n\n setFactura(infoToFactura(info));\n } catch (err) {\n notifyError(err);\n }\n };\n\n const handleDocumentSend = async () => {\n const facturaCleaned = cleanUpFacturaObj(factura, products, properties.isBudget);\n\n await dispatch(sendDocumentThunk(facturaCleaned, \"Фактура\"));\n\n if (properties.isActIncluded && sellerInfo) {\n const act = facturaToAct(facturaCleaned, sellerInfo);\n await dispatch(sendDocumentThunk(act, \"Акт\"));\n }\n };\n\n const handleDocumentSave = async () => {\n const facturaCleaned = cleanUpFacturaObj(factura, products, properties.isBudget);\n\n await dispatch(saveDocumentThunk(facturaCleaned, \"Фактура\"));\n\n if (properties.isActIncluded && sellerInfo) {\n const act = facturaToAct(facturaCleaned, sellerInfo);\n await dispatch(saveDocumentThunk(act, \"Акт\"));\n }\n };\n\n const handleIsBudgetChange = async (value: string) => {\n handlePropertiesChange(\"isBudget\", await isBudget(value));\n };\n\n const handleBuyerInfoChange = async (tin: string) => {\n try {\n const info = await fetchBuyerInfo(tin, factura.FacturaDoc.FacturaDate);\n\n setFactura((factura) => ({ ...factura, Buyer: info, BuyerTin: tin }));\n\n await handleIsBudgetChange(tin);\n } catch {\n handleTinAlertOpen();\n }\n };\n\n useEffect(() => {\n handleFacturaInit();\n }, []);\n\n useEffect(() => {\n if (factura?.BuyerTin?.length !== 9) return;\n\n Company.fetchBranches(factura.BuyerTin)\n .then((branches) => {\n setBuyerBranches(\n branches.map((branch) => ({\n value: branch.branchNum,\n label: branch.branchName,\n }))\n );\n })\n .catch(notifyError);\n }, [factura?.BuyerTin]);\n\n useEffect(() => {\n const buyerTinLength = factura?.BuyerTin?.length;\n if (buyerTinLength !== 9 && buyerTinLength !== 14 && formChanged) return;\n\n handleBuyerInfoChange(factura.BuyerTin).then(() => dispatch(docCreateActions.changedDocCreateForm(false)));\n }, [factura.BuyerTin]);\n\n useEffect(() => {\n if (docIsBeingCopied) {\n dispatch(getDocInfo(docBeingCopiedId));\n }\n }, [docIsBeingCopied]);\n\n useEffect(() => {\n if (!docIsBeingCopied || !docBeingCopiedData) return;\n\n const contents = deepClone(docBeingCopiedData.contents).version\n ? getCasedObject(docBeingCopiedData.contents, facturaDef)\n : (deepClone(docBeingCopiedData.contents) as FacturaType);\n\n const contentsProducts = contents.ProductList.Products;\n\n console.log(contents);\n\n const HasMarking = contentsProducts.some((product) => product.Marks?.ProductType);\n\n contents.HasMarking = HasMarking;\n\n //Если создается дополнитеьная фактура\n if (docIsAdditional) {\n //Дополнительная\n if (+docIsAdditionalType === 1) {\n setFactura((factura) => ({\n ...factura,\n Buyer: contents.Buyer,\n BuyerTin: contents.BuyerTin,\n FacturaType: docIsAdditionalType,\n OldFacturaDoc: {\n OldFacturaId: contents.FacturaId,\n OldFacturaNo: contents.FacturaDoc.FacturaNo,\n OldFacturaDate: contents.FacturaDoc.FacturaDate,\n },\n }));\n } else {\n //Исправление\n if (!contents.Version) {\n setFactura(() => ({\n ...contents,\n Version: 1,\n SingleSidedType: 1,\n FacturaType: docIsAdditionalType,\n OldFacturaDoc: {\n OldFacturaId: contents.FacturaId,\n OldFacturaNo: contents.FacturaDoc.FacturaNo,\n OldFacturaDate: contents.FacturaDoc.FacturaDate,\n },\n Seller: factura.Seller,\n ForeignCompany: {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n },\n }));\n\n handlePropertiesChange(\"isAutoCalc\", false);\n\n const products = contentsProducts.map((product) => ({\n ...product,\n CommittentName: \"\",\n CommittentTin: \"\",\n CommittentVatRegCode: \"\",\n Serial: \"\",\n BaseSumma: 0,\n ProfitRate: 0,\n ExciseRate: product.ExciseRate,\n ExciseSum: product.ExciseRate,\n CatalogCode: \"\",\n CatalogName: \"\",\n Barcode: \"\",\n Marks: marksDef,\n }));\n\n setProducts(products);\n } else {\n setFactura({\n ...contents,\n FacturaType: docIsAdditionalType,\n OldFacturaDoc: {\n OldFacturaId: contents.FacturaId,\n OldFacturaNo: contents.FacturaDoc.FacturaNo,\n OldFacturaDate: contents.FacturaDoc.FacturaDate,\n },\n });\n\n handlePropertiesChange(\"isAutoCalc\", false);\n setProducts(\n contents?.ProductList?.Products?.map((el) => {\n if (el.Marks) return el;\n return { ...el, Marks: marksDef };\n })\n );\n }\n }\n } else {\n //Если документ создается копированием\n\n handlePropertiesChange(\"isAutoCalc\", false);\n\n if (+contents.Version === 1) {\n setFactura({\n ...contents,\n Seller: factura.Seller,\n });\n setProducts(contentsProducts);\n } else {\n props.setNewDoc(false);\n dispatch(docCreateActions.requestDocCreateByCopyFinished());\n dispatch(docCreateActions.closedDocCreateForm());\n props.setCurDoc(null);\n notify(\"Невозможно копировать старые версии фактур\", \"warning\");\n }\n }\n if (!contents.BuyerTin.length) handlePropertiesChange(\"isOneSided\", true);\n }, [docBeingCopiedData]);\n\n return (\n <>\n {properties.isTinAlertShown && }\n \n \n {\n handlePropertiesChange(\"isOneSided\", (isOneSided) => !isOneSided);\n setBuyerFromSeller(factura, handleFacturaChange, !properties.isOneSided);\n\n let newObj = {\n ...factura,\n SingleSidedType: 1,\n ForeignCompany: {\n CountryId: \"\",\n Name: \"\",\n Address: \"\",\n Bank: \"\",\n Account: \"\",\n },\n };\n handleFacturaChange(newObj);\n }}\n >\n Односторенная фактура\n \n \n \n \n {\n handlePropertiesChange(\"isActIncluded\", (included) => !included);\n }}\n >\n Включить акт\n \n \n\n {properties.isOneSided && }\n\n {!properties.isOneSided && isVatPayerPlus && (\n \n )}\n\n {properties.isOneSided && factura.SingleSidedType === FacturaSingleTypes.OtherIncome && isVatPayerPlus && (\n \n )}\n\n \n \n {/* ============= */}\n \n \n \n

Исполнитель

\n \n
\n
\n
\n Наименование:\n {factura?.Seller?.Name}\n
\n
\n Адрес: {factura?.Seller?.Address}\n
\n
\n ИНН / ПИНФЛ: {factura.SellerTin}\n
\n
\n Рег. код плательщика НДС:\n {\n setFactura((prev) => ({\n ...prev,\n Seller: {\n ...prev.Seller,\n VatRegCode: e.target.value,\n },\n }));\n console.log(\"s\");\n }}\n size=\"sm\"\n style={{ width: \"140px\", marginLeft: \"10px\" }}\n value={factura?.Seller?.VatRegCode}\n />\n
\n
\n Название филиала\n null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: factura?.Seller?.BranchName,\n value: factura?.Seller?.BranchCode,\n }}\n onChange={(inputVal) => {\n setFactura((prev) => ({\n ...prev,\n Seller: {\n ...prev.Seller,\n BranchName: inputVal.label,\n BranchCode: inputVal.value,\n },\n }));\n }}\n placeholder=\"Выберите филиал\"\n noOptionsMessage={() => \"Филиал не найден\"}\n />\n
\n\n {factura.Seller.VatRegStatus && }\n
\n \n\n {!properties.isOneSided && (\n \n \n \n

Заказчик

\n \n \n {\n handleBuyerInfoChange(e.target.value);\n }}\n className=\"mb-2\"\n />\n \n
\n
\n
\n Наименование:\n {factura?.Buyer?.Name}\n
\n
\n Адрес: {factura?.Buyer?.Address}\n
\n
\n ИНН / ПИНФЛ: {factura.BuyerTin}\n
\n
\n Рег. код плательщика НДС:\n {\n setFactura((prev) => ({\n ...prev,\n Buyer: {\n ...prev.Buyer!,\n VatRegCode: e.target.value,\n },\n }));\n }}\n size=\"sm\"\n style={{ width: \"140px\", marginLeft: \"10px\" }}\n value={factura?.Buyer?.VatRegCode}\n />\n
\n {factura.BuyerTin && (\n
\n Название филиала\n null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: factura?.Buyer?.BranchName,\n value: factura?.Buyer?.BranchCode,\n }}\n onChange={(inputVal) => {\n setFactura((prev) => ({\n ...prev,\n Buyer: {\n ...prev.Buyer!,\n BranchName: inputVal.label,\n BranchCode: inputVal.value,\n },\n }));\n }}\n placeholder=\"Выберите филиал\"\n noOptionsMessage={() => \"Филиал не найден\"}\n />\n
\n )}\n\n {factura.Buyer?.VatRegStatus && }\n
\n \n )}\n
\n \n\n {/* SELLER AND BUYER */}\n {/* || factura.SingleSidedType == 2 */}\n\n {factura.SingleSidedType === FacturaSingleTypes.Import && (\n \n )}\n\n {(factura.FacturaType === FacturaTypes.Additional ||\n factura.FacturaType === FacturaTypes.Corrected ||\n factura.FacturaType === FacturaTypes.CompensationCorrected) && (\n \n )}\n\n \n\n \n \n \n \n \n

Список товаров

\n \n \n handlePropertiesChange(\"isAllCodes\", (prev) => !prev)}\n >\n Все коды ЕЭК\n \n \n \n handlePropertiesChange(\"isCustom\", (prev) => !prev)}\n >\n Ручной ввод ЕЭК\n \n \n \n handlePropertiesChange(\"isAutoCalc\", (prev) => !prev)}\n >\n Авто подсчет\n \n \n
\n
\n \n
\n \n
\n
\n
\n \n\n \n \n \n
Товар отпустил
\n \n handleFacturaChange({\n ...factura,\n ItemReleasedDoc: {\n ...factura.ItemReleasedDoc!,\n ItemReleasedFio: e.target.value,\n },\n })\n }\n />\n \n\n \n
 
\n \n handleFacturaChange({\n ...factura,\n ItemReleasedDoc: {\n ...factura.ItemReleasedDoc!,\n ItemReleasedPinfl: e.target.value,\n },\n })\n }\n />\n \n
\n \n \n 0 ? \"danger\" : \"success\"}\n disabled={errors.length > 0}\n onClick={handleDocumentSend}\n tag=\"div\"\n >\n Отправить документ\n \n {errors.length > 0 ? (\n \n {errors[0] + (errors.length > 1 ? \"... и еще \" + (errors.length - 1) + \"ошибок\" : \"\")}\n \n ) : (\n \"\"\n )}\n \n {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"Фактура\",\n signatures: [],\n contents: {\n ...factura,\n ProductList: {\n ...factura.ProductList,\n Products: ProductValuesToFixed(products),\n },\n },\n })\n );\n }}\n >\n Предварительный просмотр\n \n \n \n \n
\n \n );\n};\n\nexport default Factura;\n\nfunction setBuyerFromSeller(factura, onFormChanged, revert) {\n if (revert) {\n onFormChanged({ ...factura, BuyerTin: \"\", Buyer: { ...personDef } });\n }\n}\n\nconst isBudget = async (tin: string) => {\n if (tin.length === 9 || tin.length === 14) {\n const isBudget = await Company.isBudget(tin);\n\n return isBudget;\n } else {\n return false;\n }\n};\n\nconst cleanUpFacturaObj = (factura: FacturaType, products, isBudget) => {\n return facturaCleanup({\n ...factura,\n Seller: {\n ...factura.Seller,\n VatRegCode: factura.ProductList?.HasVat ? factura.Seller.VatRegCode : \"\",\n },\n LotId: isBudget ? factura.LotId : \"\",\n ProductList: {\n ...factura.ProductList,\n Products: ProductValuesToFixed(products),\n },\n });\n};\n\nexport const searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".6875rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n }),\n};\n","import { ReactNode } from \"react\";\nimport { Row, Col } from \"shards-react\";\n\ntype PropsType = {\n caption: string;\n children?: ReactNode;\n name: string;\n address?: string;\n tin: string | number;\n regCode?: string | number;\n};\n\nconst CompanyInfo = (props: PropsType) => {\n const { caption, children, name, address, tin, regCode } = props;\n\n const isPinfl = String(tin).length === 14;\n\n return (\n \n \n \n

{caption}

\n \n {children}\n
\n
\n
\n Наименование организации: {name}\n
\n
\n Адрес: {address}\n
\n
\n {isPinfl ? \"ПИНФЛ\" : \"ИНН\"}: {tin}\n
\n
\n Рег. код плательщика НДС: {regCode}\n
\n
\n \n );\n};\n\nexport default CompanyInfo;\n","import { dateF } from \"../../../utils/helpers\";\n\nexport const empowermentProduct = {\n OrdNo: 1,\n Name: \"\",\n MeasureId: \"1\",\n Count: \"\",\n};\n\nexport const defaultEmpowerment = {\n EmpowermentId: \"\",\n EmpowermentDoc: {\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n EmpowermentDateOfExpire: dateF(new Date()),\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n Agent: {\n AgentEmpowermentId: \"\",\n AgentTin: \"\",\n JobTitle: \"\",\n Fio: \"\",\n Passport: {\n Number: \"\",\n DateOfIssue: dateF(new Date()),\n IssuedBy: \"\",\n },\n },\n BuyerTin: \"\",\n SellerTin: \"\",\n Buyer: {\n Name: \"\",\n Account: \"\",\n BankId: \"\",\n Address: \"\",\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: \"\",\n DistrictId: \"\",\n Director: \"\",\n Accountant: \"\",\n VatRegCode: \"\",\n },\n Seller: {\n Name: \"\",\n Account: \"\",\n BankId: \"\",\n Address: \"\",\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: \"\",\n DistrictId: \"\",\n Director: \"\",\n Accountant: \"\",\n VatRegCode: \"\",\n },\n ProductList: {\n EmpowermentProductId: \"\",\n Tin: \"\",\n Products: [empowermentProduct],\n },\n};\n","import { none, State, useHookstate } from \"@hookstate/core\";\nimport { FormInput, Button } from \"shards-react\";\nimport { EmpowermentActType } from \"../../../../utils/models/actTypes\";\nimport { LSelect } from \"../../../common/UtilComponents\";\nimport { measures } from \"../../factura/constants\";\n\ntype PropsType = {\n products: State;\n product: State;\n};\n\nconst SingleProductRow: React.FC = (props) => {\n const products = useHookstate(props.products),\n product = useHookstate(props.product);\n\n const onProductChanged = (key: string, value) => {\n product[key].set(value);\n };\n\n const onInputChanged = (key: string) => (e) => {\n onProductChanged(key, e.target.value);\n };\n\n const onMeasureChanged = (key) => (value) => {\n onProductChanged(key, value);\n };\n\n const onProductRemoved = () => {\n product.set(none);\n\n products.set((products) =>\n products.map((product, index) => ({\n ...product,\n OrdNo: index + 1,\n }))\n );\n };\n\n return (\n \n {product.OrdNo.value}\n \n \n \n \n \n \n \n \n \n \n {(product.OrdNo.value !== 1 || products.length > 1) && (\n \n \n \n )}\n \n \n );\n};\n\nexport default SingleProductRow;\n","import { useDispatch } from \"@hooks\";\nimport { Button } from \"shards-react\";\nimport SingleProductRow from \"./SingleProductRow\";\nimport { docCreateActions } from \"../../../../redux/actions\";\nimport { EmpowermentActType } from \"../../../../utils/models/actTypes\";\nimport { State, useHookstate } from \"@hookstate/core\";\n\ntype PropsType = {\n products: State;\n};\n\nconst ProductList: React.FC = (props) => {\n const products = useHookstate(props.products);\n\n const dispatch = useDispatch();\n\n const onAddClicked = () => {\n products.set((products) => [\n ...products.map((product, index) => {\n const number = index + 1;\n\n const newProduct = {\n ...product,\n OrdNo: number,\n };\n\n return newProduct;\n }),\n { ...prodDef, OrdNo: products.length + 1 },\n ]);\n\n dispatch(docCreateActions.changedDocCreateForm(true));\n };\n\n const onResetted = () => products.set([{ ...prodDef }]);\n\n return (\n \n \n \n \n #\n \n \n Наименование\n \n \n Ед.Измер\n \n \n Кол-во\n \n \n \n \n \n {products.map((product, i) => (\n \n ))}\n \n \n \n \n \n \n \n
\n \n \n
\n );\n};\nexport default ProductList;\n\nconst prodDef = {\n OrdNo: 1,\n Name: \"\",\n MeasureId: \"1\",\n Count: \"\",\n};\n","import { State, useHookstate } from \"@hookstate/core\";\nimport { Col, Card, CardHeader, Row, CardBody, CardFooter } from \"shards-react\";\nimport { EmpowermentActType } from \"../../../../utils/models/actTypes\";\nimport ProductList from \"./ProductList\";\n\ntype PropsType = {\n products: State;\n};\n\nconst Products: React.FC = (props) => {\n const products = useHookstate(props.products);\n\n return (\n \n \n \n \n \n

Список товаров

\n \n \n
\n
\n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default Products;\n","import { State, useHookstate } from \"@hookstate/core\";\nimport { Col, Row, FormInput, DatePicker } from \"shards-react\";\nimport { EmpowermentActType } from \"../../../../utils/models/actTypes\";\nimport { dateF } from \"../../../../utils/helpers\";\n\ntype PropsType = {\n doc: State;\n onAgentTinChanged: Function;\n};\n\nconst Contract: React.FC = (props) => {\n const { onAgentTinChanged } = props;\n const doc = useHookstate(props.doc);\n\n const handleAgentTinChange = (e) => {\n onAgentTinChanged(e);\n };\n\n const handleDocChange = (key, innerKey, value) => {\n doc[key][innerKey].set(value);\n };\n\n const onInputChanged = (key, innerKey) => (e) => {\n handleDocChange(key, innerKey, e.target.value);\n };\n\n const onDateChanged = (key, innerKey) => (value) => {\n handleDocChange(key, innerKey, dateF(value));\n };\n\n return (\n \n \n \n
\n \n \n \n \n
Доверенность
\n \n \n \n
Дата выдачи
\n \n \n \n
Действителен до
\n \n \n
\n \n \n
Договор
\n \n \n \n
Дата
\n \n \n
\n \n \n \n \n
Отв. лицо
\n \n \n \n
   
\n \n \n \n
   
\n \n \n
\n \n \n
Данные
\n \n \n \n
   
\n \n \n \n
Дата выдачи
\n\n \n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default Contract;\n","import { useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button, Col, FormInput, Row } from \"shards-react\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { getDocInfo } from \"../../../redux/thunks\";\nimport { dateF } from \"../../../utils/helpers\";\nimport CompanyInfo from \"../CompanyInfo\";\nimport { useSelector } from \"../../../utils/hooks\";\nimport { defaultEmpowerment } from \"./contants\";\nimport Products from \"./Products\";\nimport Contract from \"./Contract\";\nimport { State, useHookstate } from \"@hookstate/core\";\nimport { EmpowermentActType } from \"../../../utils/models/actTypes\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { FactoredInfoType } from \"@models/CompanyTypes\";\nimport {\n saveDocumentThunk,\n sendDocumentThunk,\n} from \"@redux/thunks/documentThunks\";\n\nfunction Empowerment() {\n const dispatch = useDispatch();\n\n const { profile } = useAuth();\n const { docIsBeingCopied, docBeingCopiedId, docBeingCopiedData } =\n useSelector((state) => state.docCreateReducer);\n\n const doc = useHookstate(defaultEmpowerment);\n\n const sendDoc = async () => {\n const document = { ...doc.value };\n\n dispatch(sendDocumentThunk(document, \"Доверенность\"));\n };\n\n const saveDoc = async () => {\n const docObj = { ...doc.value };\n\n dispatch(saveDocumentThunk(docObj, \"Доверенность\"));\n };\n\n const onTinChanged = (value: string, func) => {\n const condition = value.length === 9 || value.length === 14;\n condition && dispatch(docCreateActions.changedDocCreateForm(true));\n func(value, doc);\n };\n\n const onSellerTinChanged = (e) => {\n onTinChanged(e.target.value, writeInfoSeller);\n };\n\n const onAgentTinChanged = (e) => {\n onTinChanged(e.target.value, writeInfoAgent);\n };\n\n const onReview = () => {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"Доверенность\",\n signatures: [],\n contents: doc.value,\n })\n );\n };\n\n useEffect(() => {\n if (docIsBeingCopied) dispatch(getDocInfo(docBeingCopiedId));\n\n Company.fetchInfo(profile.tin)\n .then((res) => {\n doc.set(getdocDef(res));\n })\n .catch(console.log);\n }, []);\n\n useEffect(() => {\n if (docIsBeingCopied && docBeingCopiedData)\n doc.set(docBeingCopiedData.contents);\n }, [docBeingCopiedData]);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default Empowerment;\n\nfunction writeInfoSeller(tin, doc: State) {\n if (tin.length !== 9 && tin.length !== 14) return;\n\n Company.fetchInfo(tin)\n .then((info) => {\n doc.merge({ SellerTin: tin, Seller: info });\n })\n .catch(() => {\n const emptyObj = {\n Name: \"\",\n Account: \"\",\n BankId: \"\",\n Address: \"\",\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: \"\",\n DistrictId: \"\",\n Director: \"\",\n Accountant: \"\",\n VatRegCode: \"\",\n };\n\n doc.merge({ SellerTin: \"\", Seller: emptyObj });\n });\n}\n\nfunction writeInfoAgent(tin, doc: State) {\n if (tin.length !== 9 && tin.length !== 14) return;\n\n Company.fetchInfo(tin)\n .then((info) => {\n if (!info.IsPhis) return;\n doc.Agent.merge({\n Fio: info.Name,\n AgentTin: tin,\n Passport: {\n //@ts-ignore\n Number: info.passSeries + info.passNumber,\n DateOfIssue:\n //@ts-ignore\n info.passIssueDate.slice(-4) +\n \"-\" +\n //@ts-ignore\n info.passIssueDate.slice(3, 5) +\n \"-\" +\n //@ts-ignore\n info.passIssueDate.slice(0, 2),\n //@ts-ignore\n IssuedBy: info.passOrg,\n },\n });\n })\n .catch(() => {\n doc.EmpowermentDoc.merge({\n //@ts-ignore\n AgentFIO: \"\",\n AgentTin: tin,\n });\n });\n}\n\nfunction getdocDef(info: FactoredInfoType) {\n const { Tin, Pinfl, DirectorTin, VatRegStatus, TaxGap, ...rest } = info;\n return {\n EmpowermentId: \"\",\n EmpowermentDoc: {\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n EmpowermentDateOfExpire: dateF(new Date()),\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n Agent: {\n AgentEmpowermentId: \"\",\n AgentTin: \"\",\n JobTitle: \"\",\n Fio: \"\",\n Passport: {\n Number: \"\",\n DateOfIssue: dateF(new Date()),\n IssuedBy: \"\",\n },\n },\n BuyerTin: info.Tin,\n SellerTin: \"\",\n Buyer: {\n ...rest,\n },\n Seller: {\n Name: \"\",\n Account: \"\",\n BankId: \"\",\n Address: \"\",\n Mobile: \"\",\n WorkPhone: \"\",\n Oked: \"\",\n DistrictId: \"\",\n Director: \"\",\n Accountant: \"\",\n VatRegCode: \"\",\n },\n ProductList: {\n EmpowermentProductId: \"\",\n Tin: info.Tin,\n Products: [\n {\n OrdNo: 1,\n Name: \"\",\n MeasureId: \"1\",\n Count: \"\",\n },\n ],\n },\n };\n}\n","import React from \"react\";\nimport { FormInput, Button } from \"shards-react\";\nimport { LSelect } from \"../../common/UtilComponents\";\nimport { deleteProduct } from \"../../../utils/helpers\";\nimport { measures } from \"../factura/constants\";\n\nfunction SingleProductRow(props) {\n let prod = props.product;\n const total = prod.Count * prod.Summa;\n\n if (props.autoCalc && prod.TotalSum != total)\n updateTable(\n props.index,\n \"TotalSum\",\n total,\n props.products,\n props.setProducts\n );\n\n return (\n \n {prod.OrdNo} \n \n \n updateTable(\n props.index,\n \"Name\",\n e.target.value,\n props.products,\n props.setProducts\n )\n }\n value={prod.Name}\n size=\"sm\"\n />\n \n \n \n updateTable(\n props.index,\n \"MeasureId\",\n measure,\n props.products,\n props.setProducts\n )\n }\n value={prod.MeasureId}\n size=\"sm\"\n />\n \n \n \n updateTable(\n props.index,\n \"Count\",\n e.target.value,\n props.products,\n props.setProducts\n )\n }\n value={prod.Count}\n size=\"sm\"\n />\n \n \n \n updateTable(\n props.index,\n \"Summa\",\n e.target.value,\n props.products,\n props.setProducts\n )\n }\n value={prod.Summa}\n size=\"sm\"\n />\n \n \n {\n \n updateTable(\n props.index,\n \"TotalSum\",\n e.target.value,\n props.products,\n props.setProducts\n )\n }\n value={prod.TotalSum}\n size=\"sm\"\n />\n }\n \n \n {(prod.OrdNo != 1 || props.products.length > 1) && (\n {\n deleteProduct(props.products, prod, props.setProducts);\n }}\n >\n \n \n )}\n \n \n );\n}\nexport default SingleProductRow;\n\nfunction updateTable(index, field, value, table, setTable) {\n let length = table.length;\n setTable([\n ...table.slice(0, index),\n { ...table[index], [field]: value },\n ...table.slice(index + 1, length),\n ]);\n}\n","import React, { useMemo } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button } from \"shards-react\";\nimport SingleProductRow from \"./SingleProductRow\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { toCurrency } from \"../../../utils/helpers\";\n\nfunction ProductList({ products, autoCalc, hasFuel, setProducts }) {\n const dispatch = useDispatch();\n\n const total = useMemo(() => {\n if (products.length)\n return products.reduce((a, b) => {\n return a + Number(b.TotalSum);\n }, 0);\n return null;\n }, [products]);\n\n return (\n \n \n \n \n #\n \n \n Наименование\n \n \n Ед.Измер\n \n \n Кол-во\n \n \n Цена\n \n \n Стоимость поставки\n \n \n \n \n \n {products.map((elem, index) => (\n \n ))}\n\n {!!total && (\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n \n \n
Итого: {toCurrency(total)} сум
\n {\n setProducts([\n ...products,\n {\n ...prodDef,\n OrdNo: parseInt(products.slice(-1).pop().OrdNo) + 1,\n },\n ]);\n dispatch(docCreateActions.changedDocCreateForm(true));\n }}\n >\n Добавить\n \n \n
\n );\n}\nexport default ProductList;\n\nconst prodDef = {\n OrdNo: \"1\",\n Name: \"\",\n MeasureId: \"1\",\n Count: \"0\",\n Summa: \"0\",\n TotalSum: \"0\",\n};\n","import { useState, useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport {\n Row,\n Col,\n FormInput,\n DatePicker,\n Card,\n CardHeader,\n CardBody,\n Button,\n FormTextarea,\n FormCheckbox,\n} from \"shards-react\";\nimport ProductList from \"./ProductList\";\nimport { dateF } from \"../../../utils/helpers\";\nimport CompanyInfo from \"../CompanyInfo\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { getDocInfo } from \"../../../redux/thunks\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { useSelector } from \"@hooks\";\nimport { FactoredInfoType } from \"@models/CompanyTypes\";\nimport {\n saveDocumentThunk,\n sendDocumentThunk,\n} from \"@redux/thunks/documentThunks\";\n\nfunction Act() {\n const dispatch = useDispatch();\n const { docIsBeingCopied, docBeingCopiedId, docBeingCopiedData } =\n useSelector((state) => state.docCreateReducer);\n\n const { profile } = useAuth();\n\n const [products, setProducts] = useState([\n {\n OrdNo: \"1\",\n Name: \"\",\n MeasureId: \"1\",\n Count: \"0\",\n Summa: \"0\",\n TotalSum: \"0\",\n },\n ]);\n const [autoCalc, setAutoCalc] = useState(true);\n const [doc, setDoc] = useState({});\n\n const onFormChanged = (newData) => {\n dispatch(docCreateActions.changedDocCreateForm(true));\n setDoc(newData);\n };\n\n const handleSend = () => {\n const act = {\n ...doc,\n ProductList: { ...doc.ProductList, Products: products },\n };\n\n dispatch(sendDocumentThunk(act, \"Акт\"));\n };\n\n useEffect(() => {\n if (docIsBeingCopied) {\n dispatch(getDocInfo(docBeingCopiedId));\n setAutoCalc(false);\n }\n\n Company.fetchInfo(profile.tin).then((res) => {\n setDoc(getActDef(res));\n });\n }, []);\n\n useEffect(() => {\n if (docIsBeingCopied && docBeingCopiedData) {\n setDoc(docBeingCopiedData.contents);\n setProducts(docBeingCopiedData.contents.ProductList.Products);\n }\n }, [docBeingCopiedData]);\n\n return (\n \n \n \n \n \n \n \n writeInfoBuyer(e.target.value, doc, onFormChanged)\n }\n defaultValue={doc.BuyerTin}\n />\n \n \n \n \n \n \n
\n \n \n \n \n
Акт выполненных работ
\n \n \n \n onFormChanged({\n ...doc,\n ActDoc: {\n ...doc.ActDoc,\n ActNo: e.target.value,\n },\n })\n }\n />\n \n \n \n onFormChanged({\n ...doc,\n ActDoc: { ...doc.ActDoc, ActDate: dateF(date) },\n })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n
\n \n \n
По договору
\n \n \n \n onFormChanged({\n ...doc,\n ContractDoc: {\n ...doc.ContractDoc,\n ContractNo: e.target.value,\n },\n })\n }\n />\n \n \n \n onFormChanged({\n ...doc,\n ContractDoc: {\n ...doc.ContractDoc,\n ContractDate: dateF(date),\n },\n })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n
\n \n \n \n \n
Содержание
\n \n
\n \n onFormChanged({\n ...doc,\n ActDoc: {\n ...doc.ActDoc,\n ActText: e.target.value,\n },\n })\n }\n />\n
\n
\n \n
\n \n
\n
\n \n
\n \n \n \n \n \n \n \n

\n Список товаров и услуг\n

\n \n \n setAutoCalc(!autoCalc)}\n >\n Авто подсчет\n \n \n
\n
\n \n
\n \n
\n
\n
\n \n \n {\n saveAct(\n { ...doc, ProductList: { ...doc.ProductList, Products: products } },\n dispatch\n );\n }}\n >\n Сохранить документ в черновики\n \n {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"Акт\",\n signatures: [],\n contents: {\n ...doc,\n ProductList: { ...doc.ProductList, Products: products },\n },\n })\n );\n }}\n >\n Предварительный просмотр\n \n
\n );\n}\n\nexport default Act;\n\nexport async function saveAct(docObj, dispatch) {\n await dispatch(saveDocumentThunk(docObj, \"Акт\"));\n}\n\nfunction writeInfoBuyer(tin, doc, onFormChanged) {\n if (tin.length !== 9 && tin.length !== 14) return;\n\n Company.fetchInfo(tin)\n .then((info) => {\n onFormChanged({\n ...doc,\n BuyerTin: tin,\n BuyerName: info.Name,\n BuyerAddress: info.Address,\n });\n })\n .catch(() => {\n onFormChanged({ ...doc, BuyerTin: \"\", BuyerName: \"\", BuyerAddress: \"\" });\n });\n}\n\nexport function getActDef(info: FactoredInfoType) {\n return {\n ActId: \"\",\n ActDoc: {\n ActNo: \"\",\n ActDate: dateF(new Date()),\n ActText: \"\",\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n SellerTin: info.Tin,\n SellerName: info.Name,\n SellerAddress: info.Address,\n BuyerTin: \"\",\n BuyerName: \"\",\n BuyerAddress: \"\",\n ProductList: {\n ActProductId: \"\",\n Tin: info.Tin,\n Products: [\n {\n OrdNo: 1,\n Name: \"\",\n MeasureId: \"1\",\n Count: \"0\",\n Summa: \"0\",\n TotalSum: \"0\",\n },\n ],\n },\n };\n}\n","import { useState } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport {\n Container,\n Row,\n Col,\n Button,\n FormInput,\n DatePicker,\n} from \"shards-react\";\nimport { dateF } from \"../../../utils/helpers\";\nimport { Document, Page, pdfjs } from \"react-pdf\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport DocumentApi from \"@api/Document\";\nimport { sendDocumentThunk } from \"@redux/thunks/documentThunks\";\nimport { notifyError } from \"@utils/helpers/toast\";\n\npdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;\n\nexport function PDF() {\n const { profile } = useAuth();\n const dispatch = useDispatch();\n\n const docDef = {\n Id: \"\",\n SenderTin: profile.tin,\n SenderName: profile.name,\n RecieverTin: \"\",\n RecieverName: \"\",\n Number: \"\",\n Date: dateF(new Date()),\n Meta: \"\",\n Data: \"\",\n };\n const [importVal, setImportVal] = useState(\"\");\n const [url, setUrl] = useState();\n const [pageNum, setPageNum] = useState(0);\n const [doc, setDoc] = useState(docDef);\n\n const handleFormChange = (newData) => {\n dispatch(docCreateActions.changedDocCreateForm(true));\n setDoc(newData);\n };\n\n const handleTinChange = async (e) => {\n const value = e.target.value;\n if (value.length !== 9 && value.length !== 14) {\n handleFormChange({ ...doc, RecieverTin: \"\", RecieverName: \"\" });\n return;\n }\n\n let info = await getCompanyInfo(e.target.value);\n\n if (info) {\n handleFormChange({\n ...doc,\n RecieverTin: e.target.value,\n RecieverName: info.Name,\n });\n }\n };\n\n const handleSend = async () => {\n try {\n if (doc.RecieverTin.length !== 9 && doc.RecieverTin.length !== 14) {\n throw Error(\"Заполните поле получателя\");\n }\n await sendDoc(doc, importVal, dispatch);\n } catch (err) {\n notifyError(err);\n }\n };\n\n const styleInput = {\n padding: \"10px\",\n margin: \"10px auto\",\n width: \"100%\",\n height: \"92%\",\n paddingBottom: 0,\n };\n\n return (\n \n \n \n

Загрузите документ в формате PDF

\n \n \n {\n setImportVal(e.target.files[0]);\n setUrl(URL.createObjectURL(e.target.files[0]));\n }}\n />\n \n
\n \n \n
Документ
\n \n \n \n handleFormChange({ ...doc, Number: e.target.value })\n }\n />\n \n \n \n handleFormChange({ ...doc, Date: dateF(date) })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n \n
Получатель
\n \n \n \n \n \n
{doc.RecieverName}
\n \n
\n \n
\n \n setPageNum(numPages)}\n >\n {new Array(pageNum).fill(null).map((_, ind) => (\n \n ))}\n \n \n \n
\n );\n}\n\nasync function sendDoc(doc, file, dispatch) {\n return new Promise((resolve, reject) => {\n try {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = async function () {\n const id = await DocumentApi.fetchIdLocal();\n\n const document = {\n ...doc,\n Data: reader.result.replace(\"data:application/pdf;base64,\", \"\"),\n };\n\n await dispatch(sendDocumentThunk(document, \"PDF\", id));\n resolve();\n };\n } catch (err) {\n reject(err);\n }\n });\n}\n\nasync function getCompanyInfo(tin) {\n if (tin.length !== 9 && tin.length !== 14) return { Tin: \"\", Name: \"\" };\n return await Company.fetchInfo(tin);\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAAw0lEQVRIie2WOwrCQBCGP41YbeEJFsTOKoVlij2ZhSeJd7G08AI2HkAUrGy0SBAZMlkDazAyH2wxz38W8hgwemIk7BmQR2r2wE34HLCK1B2AixYMwCNymgbLP6gL7wUTZYAjsFNiZ8W3VfILYKHEXoR6ujKW2IGShhuPEwp0woT/X1jiqN5Jn7Cnr3u6hD2NAZAJ2wFLYApcE2l4YE71R7trSQH7Vpvw0IW11adAf7LXwEn4PLBp6RUl0NOy9zPrrfE1nt45POE/HiIRAAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wD/AP+gvaeTAAAAyUlEQVRIie2VOwoCMRRFj59GyAJcgCBIiukCVlmYpQsal2FvI7gAkZSCYKPFBJQwbz4wBB3egTAk931ukZcBJROzHrEW2AABeCaaAbbxexvG2ocSeAFFjVZErexabDqQqd5o4/E3nid7C+yFWNehnkO+2TvgJCV6qrFoWk3j1LT8d8IkKWCAleQqcgYeydkCWLfkXYB7S4wyIn7mcnkyjVP6gATgIJhywFJyHLkCR0ELLbki+j/Wxv/RuA+WahZNjWaiZjP6UbrxBlDsPU3BG7TmAAAAAElFTkSuQmCC\"","import React, { useState } from \"react\";\nimport { useDispatch, useSelector } from \"@hooks\";\nimport { Modal, ModalBody } from \"shards-react\";\nimport { docCreateActions } from \"@redux/actions\";\nimport fullScreenIcon from \"@assets/files/images/full-screen.png\";\nimport normalScreenIcon from \"@assets/files/images/normal-screen.png\";\n\nexport const Preview = () => {\n const { docIsPreviewed, docPreviewedData } = useSelector(\n (state) => state.docCreateReducer\n );\n const dispatch = useDispatch();\n const [isFullWidth, setIsFullWidth] = useState(false);\n\n console.log(docPreviewedData);\n\n return (\n
\n \n dispatch(docCreateActions.setDocCreatedIsPreviewed(false, {}))\n }\n className={\"docView\" + (isFullWidth ? \" full-width\" : \"\")}\n >\n
\n
Предварительный просмотр
\n {isFullWidth ? (\n setIsFullWidth(false)}\n />\n ) : (\n setIsFullWidth(true)}\n />\n )}\n
\n \n passPreview(JSON.stringify(docPreviewedData))}\n name=\"docFrame\"\n src={\"https://l-factura.uz/check/?dev=true\"}\n />\n \n \n
\n );\n};\n\nconst passPreview = (data) => {\n let documentIframe = document\n .getElementById(\"docFrame\")\n .contentDocument.getElementById(\"documentIframe\");\n documentIframe.contentDocument.getElementById(\"fullContents\").value = data;\n documentIframe.contentDocument.getElementById(\"show\").click();\n};\n","import { useEffect, useState } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button, Row, Col, FormInput, DatePicker } from \"shards-react\";\nimport \"./custom.css\";\nimport DecoupledEditor from \"@ckeditor/ckeditor5-build-decoupled-document\";\nimport \"@ckeditor/ckeditor5-build-classic/build/translations/ru\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { dateF } from \"../../../utils/helpers\";\nimport { getDocInfo } from \"../../../redux/thunks\";\nimport { useSelector } from \"@hooks\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport { InputEventType } from \"@models\";\nimport DocumentApi from \"@api/Document\";\nimport Company from \"@api/Company\";\nimport {\n saveDocumentThunk,\n sendDocumentThunk,\n} from \"@redux/thunks/documentThunks\";\n\nconst Custom = () => {\n const { profile } = useAuth();\n const { docIsBeingCopied, docBeingCopiedId, docBeingCopiedData } =\n useSelector((state) => state.docCreateReducer);\n const [doc, setDoc] = useState({\n Id: \"\",\n SenderTin: profile.tin,\n SenderName: profile.name,\n RecieverTin: \"\",\n RecieverName: \"\",\n Number: \"\",\n Date: dateF(new Date()),\n });\n const [content, setContent] = useState(\"\");\n const dispatch = useDispatch();\n\n const onFormChanged = (newData) => {\n dispatch(docCreateActions.changedDocCreateForm(true));\n setDoc(newData);\n };\n\n const loadEditor = (data?: any) => {\n DecoupledEditor.create(\n document.querySelector(\".document-editor__editable\"),\n {\n language: \"ru\",\n }\n )\n .then((editor) => {\n const toolbarContainer = document.querySelector(\n \".document-editor__toolbar\"\n )!;\n\n toolbarContainer.appendChild(editor.ui.view.toolbar.element);\n\n editor.model.document.on(\"change:data\", (e: any) => {\n setContent(editor.getData());\n dispatch(docCreateActions.changedDocCreateForm(true));\n });\n\n if (data) {\n editor.setData(data);\n }\n\n window[\"editor\"] = editor;\n })\n .catch((err) => {\n console.error(err);\n });\n };\n\n const onTinSearched = async (e: InputEventType) => {\n const tin = e.target.value;\n let info = await getCompanyInfo(tin);\n\n onFormChanged({ ...doc, RecieverTin: tin, RecieverName: info.Name });\n };\n\n useEffect(() => {\n if (docIsBeingCopied && docBeingCopiedData) {\n loadEditor(docBeingCopiedData.contents.Data);\n\n setDoc(docBeingCopiedData.contents);\n setContent(docBeingCopiedData.contents.Data);\n }\n }, [docBeingCopiedData]);\n\n useEffect(() => {\n if (docIsBeingCopied) dispatch(getDocInfo(docBeingCopiedId));\n }, []);\n\n useEffect(() => {\n if (!docIsBeingCopied) loadEditor();\n }, []);\n\n return (\n <>\n \n \n
Документ
\n \n \n \n onFormChanged({ ...doc, Number: e.target.value })\n }\n />\n \n \n \n onFormChanged({ ...doc, Date: dateF(date) })\n }\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n \n \n \n
Получатель
\n \n \n \n \n \n
{doc.RecieverName}
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n saveAsNew(doc, dispatch, content)}\n >\n Сохранить как новый черновик\n \n {docIsBeingCopied && (\n saveDoc(doc, dispatch, content)}\n >\n Сохранить\n \n )}\n \n
\n \n );\n};\n\nconst sendDoc = async (doc, dispatch, content) => {\n const id = await DocumentApi.fetchIdLocal();\n\n const document = {\n ...doc,\n Data: content,\n };\n\n dispatch(sendDocumentThunk(document, \"HTML\", id));\n};\n\nconst saveDoc = async (doc, dispatch, content) => {\n dispatch(saveDocumentThunk({ ...doc, Data: content }, \"HTML\", doc.id));\n};\n\nconst saveAsNew = async (doc, dispatch, content) => {\n const id = await DocumentApi.fetchIdLocal();\n dispatch(saveDocumentThunk({ ...doc, Data: content }, \"HTML\", id));\n};\n\nasync function getCompanyInfo(tin) {\n const emptyObj = { Tin: \"\", Name: \"\" };\n\n if (tin.length !== 9 && tin.length !== 14) return emptyObj;\n\n try {\n const companyInfo = await Company.fetchInfo(tin);\n return companyInfo;\n } catch (err) {\n return emptyObj;\n }\n}\n\nexport default Custom;\n","import { Row, Col, FormInput } from \"shards-react\";\nimport { State, useHookstate, StateMethods } from \"@hookstate/core\";\nimport { VerifiactionActType } from \"@models/VerificationActType\";\n\ntype PropsType = {\n caption: string;\n name: StateMethods;\n tin: StateMethods;\n fizName: StateMethods;\n fizTin: StateMethods;\n act: State;\n};\n\nconst CompanyInfo: React.FC = (props) => {\n const { caption, name, tin, fizName, fizTin } = props;\n const act = useHookstate(props.act);\n\n const handleActChange = (key: string, value: any) => {\n act[key].set(value);\n };\n\n const onInputChanged = (type: \"fio\" | \"tin\") => (e) => {\n const key = getCaptionKey(caption, type);\n handleActChange(key, e.target.value);\n };\n\n return (\n \n \n \n

{caption}

\n \n {props.children}\n
\n
\n
\n Наименование организации: {name.value}\n
\n
\n ИНН: {tin.value}\n
\n
\n Директор компании:\n \n
\n
\n ИНН директора:\n \n
\n
\n \n );\n};\n\nexport default CompanyInfo;\n\nconst getCaptionKey = (caption: string, value: \"tin\" | \"fio\") => {\n if (value === \"tin\")\n return caption === \"Исполнитель\" ? \"OwnerFizTin\" : \"PartnerFizTin\";\n\n if (value === \"fio\")\n return caption === \"Исполнитель\" ? \"OwnerFizFio\" : \"PartnerFizFio\";\n\n throw new Error(\"Так не пойдет.\");\n};\n","import { Row, Col, FormInput, DatePicker } from \"shards-react\";\nimport { dateF } from \"../../../utils/helpers\";\nimport { State, useHookstate } from \"@hookstate/core\";\nimport { VerifiactionActType } from \"@models/VerificationActType\";\n\ntype PropsType = {\n act: State;\n};\n\nconst Info: React.FC = (props) => {\n const act = useHookstate(props.act);\n\n const handleActDocChange = (key, value) => {\n act.VerificationActDoc[key].set(value);\n };\n\n const onNumberChanged = (e) => {\n handleActDocChange(\"VerificationActNo\", e.target.value);\n };\n\n const onDateChanged = (date) => {\n handleActDocChange(\"VerificationActDate\", dateF(date));\n };\n\n return (\n \n \n \n

Акт сверки

\n \n
\n
\n \n \n
Номер
\n \n \n \n \n
\n \n \n
Дата
\n \n \n \n \n
\n
\n \n );\n};\n\nexport default Info;\n","import {\n VerifiactionActType,\n VerificationActContractType,\n VerificationActContractItemType,\n} from \"@models/VerificationActType\";\nimport { dateF } from \"../../../utils/helpers\";\n\nexport const VerificationActContractItem: VerificationActContractItemType = {\n OwnerOperationDate: dateF(new Date()),\n OwnerOperationName: \"\",\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerOperationDate: dateF(new Date()),\n PartnerOperationName: \"\",\n PartnerDebit: 0,\n PartnerCredit: 0,\n};\n\nexport const VerificationActContract: VerificationActContractType = {\n ContractNo: \"0\",\n ContractDate: dateF(new Date()),\n VerificationActContractItems: [VerificationActContractItem],\n OpenBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerCredit: 0,\n PartnerDebit: 0,\n },\n CloseBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerDebit: 0,\n PartnerCredit: 0,\n },\n TotalBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerDebit: 0,\n PartnerCredit: 0,\n },\n};\n\nexport const VerificationAct: VerifiactionActType = {\n VerificationActId: \"\",\n VerificationActDoc: {\n VerificationActNo: \"\",\n VerificationActDate: dateF(new Date()),\n VerificationActText: \"\",\n },\n OwnerTin: \"\",\n OwnerName: \"\",\n OwnerFizFio: \"\",\n OwnerFizTin: \"\",\n PartnerTin: \"\",\n PartnerName: \"\",\n PartnerFizTin: \"\",\n PartnerFizFio: \"\",\n VerificationActContracts: [VerificationActContract],\n OpenBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerCredit: 0,\n PartnerDebit: 0,\n },\n TurnoverBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerCredit: 0,\n PartnerDebit: 0,\n },\n CloseBalance: {\n OwnerDebit: 0,\n OwnerCredit: 0,\n PartnerDebit: 0,\n PartnerCredit: 0,\n },\n};\n","import { Row, Col, FormInput } from \"shards-react\";\nimport { State } from \"@hookstate/core\";\n\ntype PropsType = {\n title: string;\n placeholder?: string;\n debitValue: State | State;\n onDebitChanged: Function;\n debitPlaceholder?: string;\n creditValue: State | State;\n onCreditChanged: Function;\n creditPlaceholder?: string;\n};\n\nconst ActInput: React.FC = (props) => {\n const {\n title,\n debitValue,\n onDebitChanged,\n debitPlaceholder,\n creditValue,\n onCreditChanged,\n creditPlaceholder,\n placeholder,\n } = props;\n\n const handleDebitChange = (e) => {\n onDebitChanged(e);\n };\n\n const handleCreditChange = (e) => {\n onCreditChanged(e);\n };\n\n return (\n \n {title}\n\n \n \n \n \n \n \n \n );\n};\n\nexport default ActInput;\n","import { State, useHookstate } from \"@hookstate/core\";\nimport { VerificationActContractItemType as ItemType } from \"@models/VerificationActType\";\nimport { Row, Col, DatePicker, FormInput } from \"shards-react\";\nimport { dateF } from \"../../../../utils/helpers\";\n\ntype PropsType = {\n item: State;\n};\n\nconst ContractItem: React.FC = (props) => {\n const item = useHookstate(props.item);\n\n const handleChange = (\n key: keyof ItemType,\n value: ItemType[keyof ItemType]\n ) => {\n item[key].set(value as any);\n };\n\n const onDateChanged = (key) => (d) => {\n handleChange(key, dateF(d));\n };\n\n const onInputChanged = (key) => (e) => {\n handleChange(key, e.target.value);\n };\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n );\n};\n\nexport default ContractItem;\n","import { Fragment } from \"react\";\nimport { Row, Col, FormInput, DatePicker, Button } from \"shards-react\";\nimport { dateF, deepClone } from \"../../../../utils/helpers\";\nimport ActInput from \"../ActInput\";\nimport { VerificationActContractItem } from \"../constants\";\nimport ContractItem from \"./ContractItem\";\nimport { State, useHookstate, none } from \"@hookstate/core\";\nimport { VerificationActContractType as ContractType } from \"@models/VerificationActType\";\n\ntype PropsType = {\n contract: State;\n};\n\nconst Contract: React.FC = (props) => {\n const contract = useHookstate(props.contract);\n\n const handleActChange = (key: keyof ContractType, value: any) => {\n contract[key].set(value);\n };\n\n const handleContractChange = (field, innerField) => (e) => {\n contract[field][innerField].set(e.target.value);\n };\n\n const onInputChanged = (key) => (e) => {\n handleActChange(key, e.target.value);\n };\n\n const onDateChanged = (key) => (date) => {\n handleActChange(key, dateF(date));\n };\n\n const onContractItemAdded = () => {\n const contractItem = deepClone(VerificationActContractItem);\n contract.VerificationActContractItems.merge([contractItem]);\n };\n\n const onContractItemRemoved = () => {\n const items = contract.VerificationActContractItems;\n items[items.length - 1].set(none);\n };\n\n return (\n <>\n \n \n Но:\n \n \n \n \n \n От:\n \n \n \n \n \n {/* */}\n \n \n \n Сальдо начальное по договору\n\n \n \n \n \n \n \n \n \n \n \n Сальдо начальное по договору\n\n \n \n \n \n \n \n \n \n \n {/* */}\n \n \n Дата\n \n \n Документ\n \n \n Дебит\n \n \n Кредит\n \n \n\n {contract.VerificationActContractItems.map((item, i) => (\n \n ))}\n\n \n \n \n \n \n \n \n \n\n {/* */}\n \n \n \n \n \n \n \n \n {/* */}\n\n \n \n \n \n \n );\n};\n\nexport default Contract;\n","import {\n Col,\n Card,\n CardHeader,\n Row,\n CardBody,\n FormInput,\n Button,\n} from \"shards-react\";\nimport ActInput from \"../ActInput\";\nimport { VerificationActContract } from \"../constants\";\nimport Contract from \"./Contract\";\nimport { State, none, useHookstate } from \"@hookstate/core\";\nimport { deepClone, makeUid } from \"../../../../utils/helpers\";\nimport { VerifiactionActType } from \"@models/VerificationActType\";\n\ntype PropsType = {\n act: State;\n};\n\nconst Contracts: React.FC = (props) => {\n const act = useHookstate(props.act);\n\n const onInputChange = (key: string, innerKey: string) => (e) => {\n act[key][innerKey].set(e.target.value);\n };\n\n const onTableAdded = () => {\n const contract = deepClone(VerificationActContract);\n act.VerificationActContracts.merge([contract]);\n };\n\n const onTableRemoved = () => {\n act.VerificationActContracts[act.VerificationActContracts.length - 1].set(\n none\n );\n };\n\n return (\n \n \n \n \n \n

Акт

\n \n
\n
\n \n \n \n \n Сальдо начальное\n \n \n \n \n \n \n \n \n \n \n Сальдо начальное\n \n \n \n \n \n \n \n \n \n\n {act.VerificationActContracts.map((contract) => (\n \n ))}\n\n
\n\n \n \n \n \n \n \n \n \n {/* */}\n \n \n \n \n \n \n \n \n\n \n \n \n \n
\n
\n \n );\n};\n\nexport default Contracts;\n","import { useHookstate, State } from \"@hookstate/core\";\nimport { VerifiactionActType } from \"@models/VerificationActType\";\nimport { Col, Row, FormTextarea } from \"shards-react\";\n\ntype PropsType = {\n act: State;\n};\n\nconst ActDescription: React.FC = (props) => {\n const act = useHookstate(props.act);\n\n const onDescriptionChanged = (e) => {\n act.VerificationActDoc.VerificationActText.set(e.target.value);\n };\n\n return (\n \n \n \n
\n \n \n \n \n
Описание
\n \n
\n \n
\n
\n \n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default ActDescription;\n","import { useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { useSelector } from \"../../../utils/hooks\";\nimport { Row, Col, FormInput, Button } from \"shards-react\";\nimport CompanyInfo from \"./CompanyInfo\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { getDocInfo } from \"../../../redux/thunks\";\nimport Info from \"./Info\";\nimport { VerificationAct } from \"./constants\";\nimport Contracts from \"./Contracts\";\nimport ActDescription from \"./ActDescription\";\nimport { useHookstate, State } from \"@hookstate/core\";\nimport { deepClone } from \"../../../utils/helpers\";\nimport { VerifiactionActType } from \"@models/VerificationActType\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport {\n saveDocumentThunk,\n sendDocumentThunk,\n} from \"@redux/thunks/documentThunks\";\n\nconst Act = () => {\n const dispatch = useDispatch();\n const { docIsBeingCopied, docBeingCopiedId, docBeingCopiedData } =\n useSelector((state) => state.docCreateReducer);\n const { profile } = useAuth();\n\n const act = useHookstate(deepClone(VerificationAct));\n\n const sendAct = async () => {\n dispatch(sendDocumentThunk(act.value, \"Акт сверки\"));\n };\n\n const onTinSearched = (e) => {\n writeInfoBuyer(e.target.value, act);\n };\n\n const onDraftSaved = () => {\n dispatch(saveDocumentThunk(act.value, \"Акт сверки\"));\n };\n\n const onPreview = () => {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"Акт сверки\",\n contents: act.value,\n })\n );\n };\n\n useEffect(() => {\n if (docIsBeingCopied) dispatch(getDocInfo(docBeingCopiedId));\n else {\n Company.fetchInfo(profile.tin).then((info) => {\n act.merge({\n OwnerTin: info.Tin,\n OwnerName: info.Name,\n OwnerFizFio: info.Director,\n OwnerFizTin: info.Pinfl,\n });\n });\n }\n }, []);\n\n useEffect(() => {\n if (docIsBeingCopied && docBeingCopiedData)\n act.set(docBeingCopiedData.contents);\n }, [docBeingCopiedData]);\n\n return (\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n\n \n\n \n\n \n Сохранить документ в черновики\n \n\n \n \n );\n};\n\nexport default Act;\n\nfunction writeInfoBuyer(tin, act: State) {\n const clear = () => {\n act.merge({\n PartnerTin: \"\",\n PartnerName: \"\",\n PartnerFizTin: \"\",\n PartnerFizFio: \"\",\n });\n };\n\n if (tin.length !== 9 && tin.length !== 14) {\n clear();\n return;\n }\n\n Company.fetchInfo(tin)\n .then((info) => {\n act.merge({\n PartnerTin: tin,\n PartnerName: info.Name,\n PartnerFizFio: info.Director,\n PartnerFizTin: info.Pinfl,\n });\n })\n .catch(() => {\n clear();\n });\n}\n","import { ContractType } from \"@models/ContactType\";\nimport { Row, Col, FormInput } from \"shards-react\";\n\ntype PropsType = {\n caption: string;\n name: string;\n tin: string;\n fizName: string;\n fizTin: string;\n setContract: React.Dispatch>;\n index?: number;\n addSubstract?: Function;\n};\n\nconst CompanyInfo: React.FC = (props) => {\n const {\n caption,\n name,\n tin,\n fizName,\n fizTin,\n setContract,\n index,\n addSubstract,\n } = props;\n\n const handleSubtractAdd = (field: string, value: number) => () => {\n addSubstract && addSubstract();\n };\n\n return (\n \n \n \n

{caption}

\n \n {props.children}\n
\n
\n {index !== undefined && (\n \n )}\n\n
\n Наименование организации: {name}\n
\n
\n ИНН: {tin}\n
\n
\n Директор компании:\n {\n index !== undefined\n ? setContract((prev) => ({\n ...prev,\n Clients: prev.Clients.map((el, i) => {\n if (i == index) return { ...el, Fio: e.target.value };\n return el;\n }),\n }))\n : setContract((prev) => ({\n ...prev,\n Owner: {\n ...prev.Owner,\n Fio: e.target.value,\n },\n }));\n }}\n size=\"sm\"\n style={{ width: \"200px\", marginLeft: \"10px\" }}\n value={fizName}\n />\n
\n
\n ИНН директора:\n {\n index !== undefined\n ? setContract((prev) => ({\n ...prev,\n Clients: prev.Clients.map((el, i) => {\n if (i == index) return { ...el, FizTin: e.target.value };\n return el;\n }),\n }))\n : setContract((prev) => ({\n ...prev,\n Owner: {\n ...prev.Owner,\n FizTin: e.target.value,\n },\n }));\n }}\n size=\"sm\"\n style={{ width: \"200px\", marginLeft: \"10px\" }}\n value={fizTin}\n />\n
\n
\n \n );\n};\n\nexport default CompanyInfo;\n","import {\n ContractProductType,\n ContractPersonType,\n ContractType,\n} from \"@models/ContactType\";\nimport { dateF } from \"../../../utils/helpers\";\nexport const partDef = {\n OrdNo: 1,\n Title: \"\",\n Body: \"\",\n};\n\nexport const productDef: ContractProductType = {\n OrdNo: 1,\n CatalogCode: \"\",\n CatalogName: \"\",\n BarCode: \"\",\n Name: \"\",\n MeasureId: 1,\n Count: 0,\n Summa: 0,\n DeliverySum: 0,\n VatRate: 0,\n VatSum: 0,\n DeliverySumWithVat: 0,\n WithoutVat: false,\n};\n\nexport const PersonDef: ContractPersonType = {\n Tin: \"\",\n Name: \"\",\n Address: \"\",\n WorkPhone: \"\",\n Fax: \"\",\n Oked: \"\",\n Account: \"\",\n BankId: \"\",\n FizTin: \"\",\n Fio: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n Mobile: \"\",\n};\n\nexport const contractDef: ContractType = {\n ContractId: \"\",\n ContractDoc: {\n ContractName: \"\",\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n ContractExpireDate: dateF(new Date()),\n ContractPlace: \"\",\n },\n HasVat: true,\n Owner: PersonDef,\n Clients: [PersonDef],\n Products: [productDef],\n Parts: [partDef],\n};\n","import { Row, Col, FormInput, DatePicker } from \"shards-react\";\nimport { dateF } from \"../../../utils/helpers\";\n\nexport default function Info(props) {\n const { contract, setContract } = props;\n return (\n \n \n \n

Договор

\n \n
\n
\n \n \n
Название
\n \n \n {\n setContract((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractName: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"sm\"\n style={{ width: \"147px\" }}\n value={contract.ContractDoc.ContractName}\n />\n \n
\n \n \n
Номер
\n \n \n {\n setContract((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"sm\"\n style={{ width: \"147px\" }}\n value={contract.ContractDoc.ContractNo}\n />\n \n
\n \n \n
Место договора
\n \n \n {\n setContract((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractPlace: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"sm\"\n style={{ width: \"147px\" }}\n value={contract.ContractDoc.ContractPlace}\n />\n \n
\n \n \n
Дата
\n \n \n {\n setContract((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractDate: dateF(d),\n },\n }));\n }}\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n
\n \n \n
Дата истечения
\n \n \n {\n setContract((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractExpireDate: dateF(d),\n },\n }));\n }}\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n \n
\n
\n \n );\n}\n","import React, { useEffect } from \"react\";\nimport Select from \"react-select\";\nimport AsyncSelect from \"react-select/async\";\nimport { Button, FormInput } from \"shards-react\";\nimport { getCatalogInfo } from \"@utils/EImzo/SrvCon\";\nimport { LSelect } from \"../../common/UtilComponents\";\nimport { roundFloat } from \"../../../utils/helpers\";\nimport { measures } from \"../factura/constants\";\nimport { ContractType, ContractProductType } from \"@models/ContactType\";\n\ntype PropsType = {\n index: number;\n autoCalc: boolean;\n hasVat: boolean;\n product: ContractProductType;\n setContract: React.Dispatch>;\n custom: boolean;\n cods: any[];\n allCods: boolean;\n};\n\nconst Product = (props: PropsType) => {\n const {\n index,\n autoCalc,\n hasVat,\n product,\n setContract,\n custom,\n cods,\n allCods,\n } = props;\n\n const handleContactChange = (field: string, value: Value) => {\n setContract((prev) => ({\n ...prev,\n Products: prev.Products.map((el, i) => {\n if (index === i) {\n return { ...el, [field]: value };\n }\n return el;\n }),\n }));\n };\n\n useEffect(() => {\n const count =\n product.Count === \"-\" ? -1 : parseFloat(String(product.Count));\n\n const summa =\n product.Summa === \"-\" ? -1 : parseFloat(String(product.Summa));\n\n const deliverySum = roundFloat(count * summa, -2);\n\n const amountVat = roundFloat((deliverySum / 100) * product.VatRate, -2);\n const deliveryWithVat = deliverySum + amountVat;\n\n if (autoCalc && product.DeliverySum !== deliverySum && !isNaN(deliverySum))\n handleContactChange(\"DeliverySum\", deliverySum);\n\n if (autoCalc && product.VatSum !== amountVat && !isNaN(amountVat))\n handleContactChange(\"VatSum\", amountVat);\n if (\n autoCalc &&\n product.DeliverySumWithVat !== deliveryWithVat &&\n !isNaN(deliveryWithVat)\n )\n handleContactChange(\"DeliverySumWithVat\", deliveryWithVat);\n }, [product, autoCalc]);\n\n return (\n <>\n \n {product.OrdNo} \n\n \n handleContactChange(\"Name\", e.target.value)}\n value={product.Name}\n size=\"sm\"\n />\n \n\n \n {custom ? (\n \n handleContactChange(\"CatalogCode\", e.target.value)\n }\n value={product.CatalogCode}\n size=\"sm\"\n />\n ) : allCods ? (\n getCatalogInfo(inputVal, \"code\")}\n cacheOptions\n defaultOptions\n menuPlacement=\"auto\"\n menuPosition=\"fixed\"\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{ label: product.CatalogCode, value: product.CatalogCode }}\n onChange={(inputVal: any) => {\n console.log(inputVal);\n\n handleContactChange(\"CatalogCode\", inputVal.value);\n handleContactChange(\"CatalogName\", inputVal.secondArg);\n }}\n placeholder=\"\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n ) : (\n ({\n label: el.mxikCode,\n value: el.className,\n }))}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: product.CatalogCode,\n value: product.CatalogName,\n }}\n onChange={(inputVal) => {\n handleContactChange(\"CatalogCode\", inputVal.label);\n handleContactChange(\"CatalogName\", inputVal.value);\n }}\n placeholder=\"Выберите Продукт\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n )}\n \n \n {custom ? (\n \n handleContactChange(\"CatalogName\", e.target.value)\n }\n value={product.CatalogName}\n size=\"sm\"\n />\n ) : allCods ? (\n getCatalogInfo(inputVal, \"name\")}\n cacheOptions\n defaultOptions\n value={{ label: product.CatalogName, value: product.CatalogCode }}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n onChange={(inputVal: any) => {\n handleContactChange(\"CatalogName\", inputVal.value);\n handleContactChange(\"CatalogCode\", inputVal.secondArg);\n }}\n placeholder=\"\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n ) : (\n ({\n label: el.className,\n value: el.mxikCode,\n }))}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: product.CatalogName,\n value: product.CatalogCode,\n }}\n onChange={(inputVal) => {\n handleContactChange(\"CatalogCode\", inputVal.value);\n handleContactChange(\"CatalogName\", inputVal.label);\n }}\n placeholder=\"Выберите Продукт\"\n noOptionsMessage={() => \"Продукт не найден\"}\n />\n )}\n \n \n handleContactChange(\"BarCode\", e.target.value)}\n value={product.BarCode}\n size=\"sm\"\n />\n \n\n \n handleContactChange(\"MeasureId\", measure)}\n value={product.MeasureId}\n size=\"sm\"\n />\n \n\n \n handleContactChange(\"Count\", e.target.value)}\n value={product.Count}\n size=\"sm\"\n />\n \n \n handleContactChange(\"Summa\", e.target.value)}\n value={product.Summa}\n size=\"sm\"\n />\n \n \n handleContactChange(\"DeliverySum\", e.target.value)}\n value={product.DeliverySum}\n size=\"sm\"\n />\n \n\n {hasVat && (\n <>\n \n handleContactChange(\"VatRate\", e.target.value)}\n value={product.VatRate}\n size=\"sm\"\n />\n \n \n handleContactChange(\"VatSum\", e.target.value)}\n value={product.VatSum}\n size=\"sm\"\n />\n \n\n \n \n handleContactChange(\"DeliverySumWithVat\", e.target.value)\n }\n value={product.DeliverySumWithVat}\n size=\"sm\"\n />\n \n \n )}\n\n \n {+product.OrdNo !== 1 && (\n \n setContract((prev) => ({\n ...prev,\n Products: prev.Products.filter((_, i) => i !== index).map(\n (item, idx) => ({ ...item, OrdNo: idx + 1 })\n ),\n }))\n }\n >\n \n \n )}\n \n \n \n );\n};\nexport default Product;\n\nfunction validate(num) {\n if (num.length && num.includes(\",\")) return false;\n return typeof parseFloat(num) == \"number\";\n}\n\nconst searchableSelectStyles = {\n control: (provided) => ({\n ...provided,\n minHeight: 0,\n maxHeight: \"32px\",\n }),\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".6875rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n }),\n placeholder: (provided) => ({\n ...provided,\n top: \"40%\",\n }),\n};\n","import { ContractType } from \"@models/ContactType\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { Button } from \"shards-react\";\nimport { notify } from \"../../../utils/helpers/toast\";\nimport { toCurrency } from \"../../../utils/helpers\";\nimport { productDef } from \"./constant\";\nimport Product from \"./Product\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport Company from \"@api/Company\";\nimport { MarkType } from \"@models/CompanyTypes\";\n\ntype PropsType = {\n contract: ContractType;\n setContract: React.Dispatch>;\n autoCalc: boolean;\n hasVat: boolean;\n allCods: boolean;\n custom: boolean;\n};\n\nconst ProductList = (props: PropsType) => {\n const { contract, setContract, autoCalc, hasVat, allCods, custom } = props;\n const { profile } = useAuth();\n\n const [cods, setCods] = useState([]);\n\n const total = useMemo(() => {\n return contract.Products.reduce(\n (a, b) => {\n return {\n DeliverySum: a.DeliverySum + Number(b.DeliverySum),\n DeliverySumWithVat:\n a.DeliverySumWithVat + Number(b.DeliverySumWithVat),\n VatSum: a.VatSum + Number(b.VatSum),\n };\n },\n { DeliverySum: 0, DeliverySumWithVat: 0, VatSum: 0 }\n );\n }, [contract]);\n\n useEffect(() => {\n Company.fetchTotalMarks(profile.tin)\n .then((res) => setCods(res.data))\n .catch((err) => notify(err.message, \"error\"));\n }, []);\n\n return (\n <>\n \n \n \n \n #\n \n \n Наименование\n \n\n \n Код ЕЭК\n \n \n Название ЕЭК\n \n \n Штрих код\n \n\n \n Ед.Измер\n \n \n Кол-во\n \n \n Цена\n \n \n Стоимость поставки\n \n {hasVat && (\n <>\n \n Ставка НДС\n \n\n \n Сумма НДС\n \n \n Стоимость поставки с учетом НДС\n \n \n )}\n\n \n \n \n \n {contract.Products.map((elem, index) => (\n \n ))}\n\n \n \n \n \n \n {hasVat && (\n <>\n \n \n \n \n )}\n \n \n
Итого: {toCurrency(total.DeliverySum)} сум{toCurrency(total.VatSum)} сум{toCurrency(total.DeliverySumWithVat)} сум
\n\n
\n {\n setContract((contract) => ({\n ...contract,\n Products: [\n ...contract.Products,\n { ...productDef, OrdNo: contract.Products.length + 1 },\n ],\n }));\n }}\n >\n Добавить\n \n {\n setContract((contract) => ({\n ...contract,\n Products: [productDef],\n }));\n }}\n >\n Удалить Все\n \n
\n \n );\n};\n\nexport default ProductList;\n","import Company from \"@api/Company\";\nimport { useSelector } from \"@hooks\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport { useEffect, useState } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport {\n Button,\n Card,\n CardBody,\n CardHeader,\n Col,\n FormCheckbox,\n FormInput,\n FormTextarea,\n Row,\n} from \"shards-react\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport { getDocInfo } from \"../../../redux/thunks\";\nimport CompanyInfo from \"./CompanyInfo\";\nimport { contractDef, partDef, PersonDef } from \"./constant\";\nimport Info from \"./Info\";\nimport ProductList from \"./ProductList\";\nimport {\n saveDocumentThunk,\n sendDocumentThunk,\n} from \"@redux/thunks/documentThunks\";\n\nexport default function Contract() {\n const { docIsBeingCopied, docBeingCopiedId, docBeingCopiedData } =\n useSelector((state) => state.docCreateReducer);\n const { profile } = useAuth();\n\n const dispatch = useDispatch();\n\n const [contract, setContract] = useState(contractDef);\n const [autoCalc, setAutoCalc] = useState(true);\n const [allCods, setAllCods] = useState(false);\n const [custom, setCustom] = useState(false);\n\n const addSubstract = (field: string, idx?: number) => {\n setContract({\n ...contract,\n [field]:\n idx !== undefined\n ? contract[field].filter((_, i) => i !== idx)\n : [...contract[field], field === \"Parts\" ? partDef : PersonDef],\n });\n };\n\n const writeInfoBuyer = async (tin, index) => {\n let clear = false;\n\n if (tin.length !== 9 && tin.length !== 14) {\n clear = true;\n return;\n }\n\n try {\n const info = await Company.fetchInfo(tin);\n\n setContract((prev) => ({\n ...prev,\n Clients: prev.Clients.map((el, i) => {\n if (i === index)\n return {\n ...el,\n Tin: tin,\n Name: info.Name,\n FizTin: info.DirectorTin || \"\",\n Fio: info.Director || \"\",\n };\n return el;\n }),\n }));\n } catch (err) {\n clear = true;\n }\n\n if (clear)\n setContract((prev) => ({\n ...prev,\n Clients: prev.Clients.map((el, i) => {\n if (i === index)\n return { ...el, Tin: \"\", Name: \"\", FizTin: \"\", Fio: \"\" };\n return el;\n }),\n }));\n };\n\n const sendContract = async () => {\n dispatch(sendDocumentThunk(contract, \"Договор\"));\n };\n\n const saveContract = async () => {\n dispatch(saveDocumentThunk(contract, \"Договор\"));\n };\n\n useEffect(() => {\n Company.fetchInfo(profile.tin).then((info) => {\n setContract((prev) => ({\n ...prev,\n Owner: {\n ...prev.Owner,\n Name: info.Name,\n Tin: info.Tin,\n FizTin: info.DirectorTin,\n Fio: info.Director,\n },\n }));\n });\n }, []);\n\n useEffect(() => {\n if (docIsBeingCopied) dispatch(getDocInfo(docBeingCopiedId));\n }, [docIsBeingCopied]);\n\n useEffect(() => {\n if (docBeingCopiedData) setContract(docBeingCopiedData.contents);\n }, [docBeingCopiedData]);\n\n return (\n \n \n \n \n \n \n\n \n \n \n\n {contract.Clients.map((client, index) => (\n \n writeInfoBuyer(e.target.value, index)}\n defaultValue={client.Tin}\n />\n \n ))}\n\n \n
\n addSubstract(\"Clients\")}\n style={{ ...iconStyle, color: \"rgb(23, 149, 233)\" }}\n className=\"fas fa-plus-circle\"\n />\n
\n \n
\n \n\n \n \n \n \n \n

\n Список товаров и услуг\n

\n \n \n setAutoCalc(!autoCalc)}\n >\n Авто подсчет\n \n \n \n \n setContract({ ...contract, HasVat: !contract.HasVat })\n }\n >\n НДС\n \n \n \n setAllCods(!allCods)}\n >\n Все коды ЕЭК\n \n \n \n setCustom(!custom)}\n >\n Ручной ввод ЕЭК\n \n \n
\n
\n \n
\n \n
\n
\n
\n \n\n \n \n \n Разделы договора\n addSubstract(\"Parts\")}\n style={{\n marginLeft: \"10px\",\n cursor: \"pointer\",\n color: \"rgb(23, 149, 233)\",\n }}\n className=\"fas fa-plus\"\n />\n \n {contract.Parts.map((part, i) => (\n <>\n \n addSubstract(\"Parts\", i)}\n style={{\n cursor: \"pointer\",\n position: \"absolute\",\n color: \"red\",\n right: \"15px\",\n top: \"0\",\n }}\n className=\"fas fa-minus-circle\"\n />\n \n setContract({\n ...contract,\n Parts: contract.Parts.map((el, idx) => {\n if (i === idx) return { ...el, Title: e.target.value };\n return el;\n }),\n })\n }\n />\n \n \n \n setContract({\n ...contract,\n Parts: contract.Parts.map((el, idx) => {\n if (i === idx) return { ...el, Body: e.target.value };\n return el;\n }),\n })\n }\n />\n \n \n ))}\n \n \n \n \n \n {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"Договор\",\n signatures: [],\n contents: contract,\n })\n );\n }}\n >\n Предварительный просмотр\n \n \n \n \n
\n );\n}\n\nconst emptyBlockStyle = {\n border: \"1px dashed #ccc\",\n height: \"200px\",\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"8px\",\n marginTop: \"auto\",\n};\n\nconst iconStyle = {\n cursor: \"pointer\",\n fontSize: \"30px\",\n margin: \"0 5px\",\n};\n","import React from \"react\";\nimport { Col, FormInput, Row } from \"shards-react\";\n\nconst CompanyInfo = ({ sender, children, wayBill, setWayBill, changeText }) => (\n \n \n \n

{sender ? \"Исполнитель\" : \"Заказчик\"}

\n \n
\n
\n
\n {sender ? \"Заказчик\" : \"Перевозчик\"}:\n \n
\n
\n ИНН:\n \n
\n
\n {sender ? \"Грузоотправитель\" : \"Грузополучатель\"}:\n \n
\n
\n ИНН {sender ? \"Грузоотправителья\" : \"Грузополучателя\"}:\n \n
\n {wayBill.PointDocs.map((point, idx) => (\n
\n Пункт {sender ? \"погрузки\" : \"разгрузки\"} {idx + 1}:\n {\n setWayBill((prev) => ({\n ...prev,\n PointDocs: wayBill.PointDocs.map((el, i) => {\n if (idx == i)\n return {\n ...el,\n [sender ? \"PointOfLoading\" : \"PointOfUnloading\"]:\n e.target.value,\n };\n return el;\n }),\n }));\n }}\n style={{ width: \"200px\" }}\n value={sender ? point.PointOfLoading : point.PointOfUnloading}\n />\n
\n ))}\n\n
\n Переадресовка:\n \n
\n
\n \n);\n\nexport default CompanyInfo;\n","import { dateF } from \"../../../utils/helpers\";\n\nexport const prodDef = {\n OrdNo: 1,\n Name: \"\",\n MeasureId: \"1\",\n Summa: 0,\n Count: 0,\n TotalSum: 0,\n RoadHaulageCost: \"\",\n FollowDocuments: \"\",\n MethodDefineWeight: \"\",\n LoadClass: \"\",\n WeightBrutto: 0,\n WeightNetto: 0,\n};\n\nexport const billDef = {\n WaybillId: \"\",\n WaybillDoc: { WaybillNo: \"\", WaybillDate: dateF(new Date()) },\n DeliveryType: \"1\",\n ContractDoc: { ContractNo: \"\", ContractDate: dateF(new Date()) },\n TripTicketDoc: { TripTicketNo: \"\", TripTicketDate: dateF(new Date()) },\n TruckDoc: { TruckRegNo: \"\", TruckModel: \"\" },\n TrailerDoc: {\n TrailerType: \"\",\n TrailerRegNo: \"\",\n TrailerModel: \"\",\n },\n DriverFio: \"\",\n CarrierTin: \"\",\n CarrierName: \"\",\n CustomerTin: \"\",\n CustomerName: \"\",\n SellerTin: \"\",\n SellerName: \"\",\n BuyerTin: \"\",\n BuyerName: \"\",\n PointDocs: [\n {\n PointOfLoading: \"\",\n PointOfUnloading: \"\",\n },\n {\n PointOfLoading: \"\",\n PointOfUnloading: \"\",\n },\n ],\n PointOfRedirectName: \"\",\n PointOfRedirectAddress: \"\",\n SpecialNotes: \"\",\n GiverFio: \"\",\n GiverDriverFio: \"\",\n TakerFio: \"\",\n TakerDriverFio: \"\",\n DeliveryDistanceDoc: {\n DeliveryDistance: \"\",\n DeliveryDistanceInCity: \"\",\n },\n ProductList: {\n WaybillProductId: \"\",\n Tin: \"\",\n Products: [prodDef],\n },\n};\n","import { Row, Col, FormInput, DatePicker, FormRadio } from \"shards-react\";\nimport { dateF } from \"../../../utils/helpers\";\n\nexport default function Info({ wayBill, setWayBill }) {\n return (\n \n \n \n

ТТН

\n \n
\n
\n
\n
Номер ТТН
\n {\n setWayBill((prev) => ({\n ...prev,\n WaybillDoc: {\n ...prev.WaybillDoc,\n WaybillNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.WaybillDoc.WaybillNo}\n />\n
\n
\n
Дата ТТН
\n\n
\n {\n setWayBill((prev) => ({\n ...prev,\n WaybillDoc: {\n ...prev.WaybillDoc,\n WaybillDate: dateF(d),\n },\n }));\n }}\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n
\n
\n \n {\n setWayBill((prev) => ({\n ...prev,\n DeliveryType: \"1\",\n }));\n }}\n >\n со склада на склад\n \n\n {\n setWayBill((prev) => ({\n ...prev,\n DeliveryType: \"2\",\n }));\n }}\n >\n от продавца к покупателю\n \n
\n
\n
Номер договора
\n\n {\n setWayBill((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.ContractDoc.ContractNo}\n />\n
\n
\n
Дата договора
\n
\n {\n setWayBill((prev) => ({\n ...prev,\n ContractDoc: {\n ...prev.ContractDoc,\n ContractDate: dateF(d),\n },\n }));\n }}\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n
\n
\n
\n
Номер пут. листа
\n\n {\n setWayBill((prev) => ({\n ...prev,\n TripTicketDoc: {\n ...prev.TripTicketDoc,\n TripTicketNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.TripTicketDoc.TripTicketNo}\n />\n
\n
\n
Дата пут. листа
\n\n
\n {\n setWayBill((prev) => ({\n ...prev,\n TripTicketDoc: {\n ...prev.TripTicketDoc,\n TripTicketDate: dateF(d),\n },\n }));\n }}\n dropdownMode=\"select\"\n placeholderText=\"Дата\"\n />\n
\n
\n
\n
Гос. номер автомобиля
\n\n {\n setWayBill((prev) => ({\n ...prev,\n TruckDoc: {\n ...prev.TruckDoc,\n TruckRegNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.TruckDoc.TruckRegNo}\n />\n
\n
\n
Модель автомобиля
\n\n {\n setWayBill((prev) => ({\n ...prev,\n TruckDoc: {\n ...prev.TruckDoc,\n TruckModel: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.TruckDoc.TruckModel}\n />\n
\n \n {\n setWayBill((prev) => ({\n ...prev,\n TrailerDoc: {\n ...prev.TrailerDoc,\n TrailerType: \"1\",\n },\n }));\n }}\n >\n Прицеп\n \n\n {\n setWayBill((prev) => ({\n ...prev,\n TrailerDoc: {\n ...prev.TrailerDoc,\n TrailerType: \"2\",\n },\n }));\n }}\n >\n Полуприцеп\n \n \n
\n
Гос. номер прицепа
\n\n {\n setWayBill((prev) => ({\n ...prev,\n TrailerDoc: {\n ...prev.TrailerDoc,\n TrailerRegNo: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.TrailerDoc.TrailerRegNo}\n />\n
\n
\n
Модель прицепа
\n\n {\n setWayBill((prev) => ({\n ...prev,\n TrailerDoc: {\n ...prev.TrailerDoc,\n TrailerModel: e.target.value,\n },\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.TrailerDoc.TrailerModel}\n />\n
\n
\n
ФИО водителя
\n\n {\n setWayBill((prev) => ({\n ...prev,\n DriverFio: e.target.value,\n }));\n }}\n className=\"mb-1\"\n size=\"md\"\n style={{ width: \"190px\" }}\n value={wayBill.DriverFio}\n />\n
\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport {\n Button,\n Card,\n CardBody,\n CardHeader,\n Col,\n FormCheckbox,\n FormInput,\n FormTextarea,\n Row,\n} from \"shards-react\";\nimport { docCreateActions } from \"../../../redux/actions\";\nimport CompanyInfo from \"./CompanyInfo\";\nimport { billDef } from \"./constants\";\nimport Info from \"./Info\";\nimport ProductList from \"./ProductList\";\n\nexport default function WayBill() {\n const dispatch = useDispatch();\n const [wayBill, setWayBill] = useState(billDef);\n const [autoCalc, setAutoCalc] = useState(true);\n\n const sendWayBill = () => {};\n const saveWayBill = () => {};\n\n const changeText = (e) => {\n setWayBill((prev) => ({\n ...prev,\n [e.target.name]: e.target.value,\n }));\n };\n\n return (\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n
\n
\n Особые отметки:\n \n
\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n\n \n {\n setWayBill((prev) => ({\n ...prev,\n DeliveryDistanceDoc: {\n ...prev.DeliveryDistanceDoc,\n DeliveryDistance: e.target.value,\n },\n }));\n }}\n value={wayBill.DeliveryDistanceDoc.DeliveryDistance}\n />\n \n\n \n {\n setWayBill((prev) => ({\n ...prev,\n DeliveryDistanceDoc: {\n ...prev.DeliveryDistanceDoc,\n DeliveryDistanceInCity: e.target.value,\n },\n }));\n }}\n value={wayBill.DeliveryDistanceDoc.DeliveryDistanceInCity}\n />\n \n \n
\n \n\n {/* \n \n \n \n \n

\n Список товаров и услуг\n

\n \n \n setAutoCalc(!autoCalc)}\n >\n Авто подсчет\n \n \n
\n
\n \n
\n \n
\n
\n
\n */}\n\n \n \n \n \n {\n dispatch(\n docCreateActions.setDocCreatedIsPreviewed(true, {\n docType: \"ТТН\",\n signatures: [],\n contents: wayBill,\n })\n );\n }}\n >\n Предварительный просмотр\n \n \n \n
\n );\n}\n","import { dateF } from \"@utils/helpers\";\nimport { makeAutoObservable } from \"mobx\";\nimport {\n TypesBillDef,\n Keys,\n RoadwayKeys,\n TypesProductGroups,\n ProductInfoTable,\n} from \"../types\";\n\nclass Store {\n obj: TypesBillDef = {\n WaybillLocalId: \"\",\n DeliveryType: 2,\n WaybillDoc: {\n WaybillNo: \"\",\n WaybillDate: dateF(new Date()),\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n Consignor: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Consignee: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n FreightForwarder: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Carrier: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n // not required\n isVisibleClient: false,\n isVisibleUnloadingTrustee: false,\n isVisiblePayer: false,\n isVisibleLoadingTrustee: false,\n isVisibleUnloadingEmpowerment: false,\n isVisibleTrailer: false,\n // -------------\n Client: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n\n Payer: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n\n ResponsiblePerson: {\n Pinfl: \"\",\n FullName: \"\",\n },\n TransportType: 1,\n Roadway: {\n OtherCarOwners: [],\n Driver: {\n Pinfl: \"\",\n FullName: \"\",\n },\n Truck: {\n RegNo: \"\",\n Model: \"\",\n },\n Trailer: {\n RegNo: \"\",\n Model: \"\",\n },\n Carriages: [],\n ProductGroups: [\n {\n LoadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n LoadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n UnloadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingEmpowerment: {\n EmpowermentId: \"\",\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n EmpowermentDateOfExpire: dateF(new Date()),\n },\n ProductInfo: {\n TotalDeliverySum: 0.0,\n TotalWeightBrutto: 0.0,\n HasCommittent: true,\n Products: [\n {\n OrdNo: 0,\n CommittentTinOrPinfl: \"\",\n CommittentName: \"\",\n ProductName: \"\",\n CatalogCode: \"\",\n CatalogName: \"\",\n PackageCode: \"\",\n PackageName: \"\",\n Amount: 0.0,\n Price: 0.0,\n DeliverySum: 0.0,\n WeightBrutto: 0.0,\n WeightNetto: 0.0,\n },\n ],\n },\n },\n ],\n },\n Airway: {},\n Railway: {},\n Shipway: {},\n TotalDistance: 0.0,\n DeliveryCost: 0.0,\n TotalDeliveryCost: 0.0,\n };\n constructor() {\n makeAutoObservable(this, {}, { autoBind: true });\n }\n\n changeObjValue(\n type: Key,\n property: Keys[Key],\n value: any\n ) {\n // @ts-ignore\n this.obj[type][property] = value;\n }\n\n changeRoadwayObjValue(\n type: Key,\n property: RoadwayKeys[Key],\n value: any\n ) {\n // @ts-ignore\n this.obj.Roadway[type][property] = value;\n }\n\n changeDeliveryType(value: number) {\n this.obj.DeliveryType = value;\n }\n\n addCarOwner() {\n this.obj.Roadway.OtherCarOwners.push({\n TinOrPinfl: \"\",\n Name: \"\",\n });\n }\n\n addCarriage() {\n this.obj.Roadway.Carriages.push({\n RegNo: \"\",\n Model: \"\",\n });\n }\n\n deleteCarOwner(selected: number | \"all\") {\n if (selected === \"all\") {\n this.obj.Roadway.OtherCarOwners = [];\n } else {\n this.obj.Roadway.OtherCarOwners.splice(selected, 1);\n }\n }\n\n deleteCarriage(selected: number | \"all\") {\n if (selected === \"all\") {\n this.obj.Roadway.Carriages = [];\n } else {\n this.obj.Roadway.Carriages.splice(selected, 1);\n }\n }\n\n editCarOwnersValue(\n type: \"TinOrPinfl\" | \"Name\",\n index: number,\n value: string\n ) {\n this.obj.Roadway.OtherCarOwners[index][type] = value;\n }\n\n editCarriagesValue(type: \"RegNo\" | \"Model\", index: number, value: string) {\n this.obj.Roadway.Carriages[index][type] = value;\n }\n\n addNewGroup() {\n this.obj.Roadway.ProductGroups.push({\n LoadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n LoadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n UnloadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingEmpowerment: {\n EmpowermentId: \"\",\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n EmpowermentDateOfExpire: dateF(new Date()),\n },\n ProductInfo: {\n TotalDeliverySum: 0.0,\n TotalWeightBrutto: 0.0,\n HasCommittent: true,\n Products: [\n {\n OrdNo: 0,\n CommittentTinOrPinfl: \"\",\n CommittentName: \"\",\n ProductName: \"\",\n CatalogCode: \"\",\n CatalogName: \"\",\n PackageCode: \"\",\n PackageName: \"\",\n Amount: 0.0,\n Price: 0.0,\n DeliverySum: 0.0,\n WeightBrutto: 0.0,\n WeightNetto: 0.0,\n },\n ],\n },\n });\n }\n\n removeGroup(index: number) {\n this.obj.Roadway.ProductGroups.splice(index, 1);\n }\n\n changeProductGroupsObjValue(\n type: Key,\n index: number,\n property: TypesProductGroups[Key],\n value: string | number\n ) {\n // @ts-ignore\n this.obj.Roadway.ProductGroups[index][type][property] = value;\n }\n\n changeProductGroupsHasCommittent(value: boolean, index: number) {\n this.obj.Roadway.ProductGroups[index].ProductInfo.HasCommittent = value;\n }\n\n addProductInfoTable(index: number) {\n this.obj.Roadway.ProductGroups[index].ProductInfo.Products.push({\n OrdNo: 0,\n CommittentTinOrPinfl: \"\",\n CommittentName: \"\",\n ProductName: \"\",\n CatalogCode: \"\",\n CatalogName: \"\",\n PackageCode: \"\",\n PackageName: \"\",\n Amount: 0.0,\n Price: 0.0,\n DeliverySum: 0.0,\n WeightBrutto: 0.0,\n WeightNetto: 0.0,\n });\n }\n\n deleteProductInfoTable(index: number, tableIndex: number) {\n this.obj.Roadway.ProductGroups[index].ProductInfo.Products.splice(\n tableIndex,\n 1\n );\n }\n\n editProductInfoTable(\n type: Key,\n index: number,\n tableIndex: number,\n value: ProductInfoTable[Key]\n ) {\n this.obj.Roadway.ProductGroups[index].ProductInfo.Products[tableIndex][\n type\n ] = value;\n }\n\n toggleVisibility(\n type:\n | \"isVisibleClient\"\n | \"isVisibleUnloadingTrustee\"\n | \"isVisiblePayer\"\n | \"isVisibleLoadingTrustee\"\n | \"isVisibleUnloadingEmpowerment\"\n | \"isVisibleTrailer\"\n ) {\n this.obj[type] = !this.obj[type];\n }\n\n resetStore() {\n this.obj = {\n // ----------------------------\n isVisibleClient: false,\n isVisibleUnloadingTrustee: false,\n isVisiblePayer: false,\n isVisibleLoadingTrustee: false,\n isVisibleUnloadingEmpowerment: false,\n isVisibleTrailer: false,\n // ----------------------------\n\n WaybillLocalId: \"\",\n DeliveryType: 2,\n WaybillDoc: {\n WaybillNo: \"\",\n WaybillDate: dateF(new Date()),\n },\n ContractDoc: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n },\n Consignor: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Consignee: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n FreightForwarder: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Carrier: {\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Client: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n Payer: {\n ContractNo: \"\",\n ContractDate: dateF(new Date()),\n TinOrPinfl: \"\",\n Name: \"\",\n BranchCode: \"\",\n BranchName: \"\",\n },\n ResponsiblePerson: {\n Pinfl: \"\",\n FullName: \"\",\n },\n TransportType: 1,\n Roadway: {\n OtherCarOwners: [],\n Driver: {\n Pinfl: \"\",\n FullName: \"\",\n },\n Truck: {\n RegNo: \"\",\n Model: \"\",\n },\n Trailer: {\n RegNo: \"\",\n Model: \"\",\n },\n Carriages: [],\n ProductGroups: [\n {\n LoadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n LoadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingPoint: {\n RegionId: 0,\n RegionName: \"\",\n DistrictCode: 0,\n DistrictName: \"\",\n MahallaId: 0,\n MahallaName: \"\",\n Address: \"\",\n Longitude: 0.0,\n Latitude: 0.0,\n },\n UnloadingTrustee: {\n Pinfl: \"\",\n FullName: \"\",\n },\n UnloadingEmpowerment: {\n EmpowermentId: \"\",\n EmpowermentNo: \"\",\n EmpowermentDateOfIssue: dateF(new Date()),\n EmpowermentDateOfExpire: dateF(new Date()),\n },\n ProductInfo: {\n TotalDeliverySum: 0.0,\n TotalWeightBrutto: 0.0,\n HasCommittent: true,\n Products: [\n {\n OrdNo: 0,\n CommittentTinOrPinfl: \"\",\n CommittentName: \"\",\n ProductName: \"\",\n CatalogCode: \"\",\n CatalogName: \"\",\n PackageCode: \"\",\n PackageName: \"\",\n Amount: 0.0,\n Price: 0.0,\n DeliverySum: 0.0,\n WeightBrutto: 0.0,\n WeightNetto: 0.0,\n },\n ],\n },\n },\n ],\n },\n Airway: {},\n Railway: {},\n Shipway: {},\n TotalDistance: 0.0,\n DeliveryCost: 0.0,\n TotalDeliveryCost: 0.0,\n };\n }\n}\n\nexport default new Store();\n","import { Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport Store from \"./mobx/store\";\nimport { useEffect, useState } from \"react\";\nimport Company from \"@api/Company\";\n\nexport const RoadwayForm1 = observer(() => {\n const { obj, changeRoadwayObjValue } = Store;\n const [loading, setLoading] = useState(false);\n\n useEffect(() => {\n if (obj.Roadway.Driver.Pinfl?.length === 14) {\n getInfo();\n }\n }, [obj.Roadway.Driver.Pinfl]);\n\n const getInfo = async () => {\n setLoading(true);\n try {\n let info = await Company.fetchInfo(obj.Roadway.Driver.Pinfl);\n changeRoadwayObjValue(\"Driver\", \"FullName\", info?.Name);\n } catch (error) {}\n setLoading(false);\n };\n\n const CustomLoader = ({ value }: { value: string }) => {\n return (\n <>\n {loading ? (\n \n ) : value?.length !== 14 ? (\n \n ) : null}\n \n );\n };\n\n return (\n \n \n \n
\n * Водитель\n
\n \n
\n
\n
\n

\n * ПИНФЛ:\n

\n {\n if (!loading && text.target.value.trim().length < 15) {\n changeRoadwayObjValue(\"Driver\", \"Pinfl\", text.target.value);\n }\n }}\n w={200}\n value={obj.Roadway.Driver.Pinfl}\n rightSection={}\n />\n
\n
\n

\n * Название компании:\n

\n \n
\n
\n \n );\n});\n","import { Col, FormCheckbox, FormInput, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { TextInput } from \"@mantine/core\";\nimport { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\nimport Store from \"./mobx/store\";\nimport Company from \"@api/Company\";\n\nexport const RoadwayForm2 = observer(() => {\n const { obj, changeRoadwayObjValue, toggleVisibility } = Store;\n const [transports, setTransports] = useState([]);\n\n useEffect(() => {\n if (\n obj.Carrier.TinOrPinfl?.length === 9 ||\n obj.Carrier.TinOrPinfl?.length === 14\n ) {\n Company.fetchTransports(obj.Carrier.TinOrPinfl).then((response: any) => {\n let data = response.result?.map((item) => {\n return { value: item.regNo, label: item.model };\n });\n setTransports(data);\n });\n }\n }, [obj.Carrier.TinOrPinfl]);\n\n return (\n \n \n \n {\n toggleVisibility(\"isVisibleTrailer\");\n }}\n />\n
Полуприцеп
\n \n
\n\n \n
\n

\n * \n Гос. номер автомобиля\n

\n null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: obj.Roadway.Trailer.Model,\n value: obj.Roadway.Trailer.RegNo,\n }}\n onChange={(inputVal) => {\n changeRoadwayObjValue(\"Trailer\", \"RegNo\", inputVal?.value);\n changeRoadwayObjValue(\"Trailer\", \"Model\", inputVal?.label);\n }}\n placeholder=\"Гос. номер автомобиля\"\n noOptionsMessage={() => \"не найден\"}\n />\n
\n
\n

\n * \n Модель полуприцепа\n

\n \n
\n \n \n );\n});\n\nconst searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".9rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n width: 200,\n height: 35,\n }),\n};\n","import { Button, Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport React, { useState } from \"react\";\nimport Store from \"./mobx/store\";\nimport Company from \"@api/Company\";\n\nexport const RoadwayOtherCarOwners = observer(() => {\n const { obj, addCarOwner, editCarOwnersValue, deleteCarOwner } = Store;\n\n const CustomRow = observer(({ item, index }: any) => {\n const [loading, setLoading] = useState(false);\n\n const getInfo = (value: string) => {\n setLoading(true);\n Company.fetchInfo(value)\n .then((info) => {\n if (info) {\n editCarOwnersValue(\"Name\", index, info.Name);\n }\n })\n .finally(() => {\n setLoading(false);\n });\n };\n\n const handleChange = (text: string) => {\n editCarOwnersValue(\"TinOrPinfl\", index, text);\n if (item.TinOrPinfl?.length === 9 || item.TinOrPinfl?.length === 14) {\n getInfo(text);\n }\n\n if (text === \"\") {\n editCarOwnersValue(\"Name\", index, \"\");\n }\n };\n\n return (\n \n {index + 1}\n \n \n {loading ? (\n \n ) : item.TinOrPinfl?.length !== 9 &&\n item.TinOrPinfl?.length !== 14 ? (\n \n ) : null}\n \n }\n placeholder=\"ИНН / ПИНФЛ\"\n onChange={(text) => {\n if (!loading && text.target.value.trim().length < 15) {\n handleChange(text.target.value);\n }\n }}\n value={item.TinOrPinfl}\n />\n \n \n \n \n \n \n deleteCarOwner(index)}\n >\n \n \n \n \n \n );\n });\n\n return (\n <>\n {obj.Roadway.OtherCarOwners.length > 0 ? (\n \n \n
\n
Другие владельцы автомобилей
\n
\n \n \n \n \n \n \n \n {obj.Roadway.OtherCarOwners.map((item: any, index) => {\n return ;\n })}\n
#\n

\n * ИНН / ПИНФЛ\n

\n
\n

\n * Ф.И.О\n

\n
\n
\n
\n \n {\n deleteCarOwner(\"all\");\n }}\n theme=\"danger\"\n >\n удалить все\n \n
\n
\n \n
\n ) : (\n \n
\n

Другие владельцы автомобилей

\n \n
\n \n )}\n \n );\n});\n","import { Button, Col, FormInput, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport Store from \"./mobx/store\";\nimport { TextInput } from \"@mantine/core\";\n\nexport const RoadwayCarriages = observer(() => {\n const { obj, addCarriage, editCarriagesValue, deleteCarriage } = Store;\n\n return (\n <>\n {obj.Roadway.Carriages.length > 0 ? (\n \n \n
\n
Данные прицепа:
\n
\n \n \n \n \n\n \n \n \n {obj.Roadway.Carriages.map((item: any, index) => {\n return (\n \n \n \n \n \n \n );\n })}\n
#\n

\n * Гос. номер автомобиля\n

\n
\n

\n * Модель авто\n

\n
{index + 1}\n {\n editCarriagesValue(\n \"RegNo\",\n index,\n text.target.value\n );\n }}\n value={item.RegNo}\n />\n \n {\n editCarriagesValue(\n \"Model\",\n index,\n text.target.value\n );\n }}\n value={item.Model}\n />\n \n \n deleteCarriage(index)}\n >\n \n \n \n
\n
\n
\n \n {\n deleteCarriage(\"all\");\n }}\n theme=\"danger\"\n >\n удалить все\n \n
\n
\n \n
\n ) : (\n \n
\n

Прицеп

\n \n
\n \n )}\n \n );\n});\n","import { Map, Placemark, YMaps } from \"@pbe/react-yandex-maps\";\nimport { observer } from \"mobx-react-lite\";\nimport { useEffect, useState } from \"react\";\nimport { Button, Col, FormInput, Modal, ModalBody, Row } from \"shards-react\";\nimport Store from \"./mobx/store\";\nimport Company from \"@api/Company\";\nimport Select from \"react-select\";\nimport { TextInput } from \"@mantine/core\";\n\ntype Props = {\n type: \"LoadingPoint\" | \"UnloadingPoint\";\n item: any;\n index: number;\n};\n\nexport const ProductGroupForm1 = observer(({ type, item, index }: Props) => {\n const { changeProductGroupsObjValue } = Store;\n const [open, setOpen] = useState(false);\n const [regions, setRegions] = useState([]);\n const [districts, setDisctricts] = useState([]);\n const [mahalla, setMahalla] = useState([]);\n\n const [latlon, setLatLon] = useState({\n lat: 0,\n lon: 0,\n });\n\n const toggleMapModal = () => {\n setOpen((prev) => !prev);\n };\n\n const getRegions = async () => {\n try {\n let response: any = await Company.fetchRegions();\n let data = response.result.map((item: any) => {\n return { label: item.nameRu, value: item.regionId };\n });\n setRegions(data);\n } catch (error) {}\n };\n\n const getDistricts = async (regionId: string) => {\n try {\n let response: any = await Company.fetchDistricts(regionId);\n let data = response.result.map((item: any) => {\n return { label: item.nameRu, value: item.regionId, soato: item.soato };\n });\n setDisctricts(data);\n } catch (error) {}\n };\n\n const getMahalla = async (soato: string) => {\n try {\n let response: any = await Company.fetchVillages(soato);\n let data = response.result.map((item: any) => {\n return { label: item.nameRu, value: item.regionId };\n });\n setMahalla(data);\n } catch (error) {}\n };\n\n const clearSelect = (data: Array<\"district\" | \"mahalla\">) => {\n data.map((item) => {\n switch (item) {\n case \"district\":\n changeProductGroupsObjValue(type, index, \"DistrictCode\", \"\");\n changeProductGroupsObjValue(type, index, \"DistrictName\", \"\");\n setDisctricts([]);\n break;\n\n case \"mahalla\":\n changeProductGroupsObjValue(type, index, \"MahallaId\", \"\");\n changeProductGroupsObjValue(type, index, \"MahallaName\", \"\");\n setMahalla([]);\n break;\n }\n });\n };\n\n useEffect(() => {\n getRegions();\n }, []);\n\n return (\n <>\n \n <>\n
\n {type === \"LoadingPoint\" ? \"Адрес погрузки\" : \"Адрес доставки\"}\n
\n
\n
\n

лат:

\n {\n setLatLon((prev) => ({ ...prev, lat: text.target.value }));\n }}\n style={{ width: \"200px\" }}\n value={latlon.lat}\n />\n

лон:

\n {\n setLatLon((prev) => ({ ...prev, lon: text.target.value }));\n }}\n style={{ width: \"200px\" }}\n value={latlon.lon}\n />\n
\n
\n {\n toggleMapModal();\n\n changeProductGroupsObjValue(\n type,\n index,\n \"Latitude\",\n latlon.lat\n );\n\n changeProductGroupsObjValue(\n type,\n index,\n \"Longitude\",\n latlon.lon\n );\n }}\n className=\"mr-2\"\n theme=\"info\"\n >\n Подтверждать\n \n\n \n
\n
\n \n \n \n {\n let coords = e.get(\"coords\");\n setLatLon({ lat: coords[0], lon: coords[1] });\n }}\n width=\"100%\"\n height=\"100%\"\n modules={[\"control.ZoomControl\"]}\n defaultState={{ center: [41.32, 69.24], zoom: 12 }}\n >\n \n \n \n \n
\n\n \n \n \n
\n
\n * {\" \"}\n {type === \"LoadingPoint\" ? \"Адрес погрузки\" : \"Адрес доставки\"}\n
\n {\n setOpen(true);\n setLatLon({\n lat: item[type].Latitude,\n lon: item[type].Longitude,\n });\n }}\n size=\"sm\"\n theme=\"info\"\n >\n \n \n
\n \n
\n
\n
\n

\n * Область:\n

\n 0}\n isSearchable={true}\n options={regions}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: item[type].RegionName,\n value: item[type].RegionId,\n }}\n onChange={(inputVal) => {\n changeProductGroupsObjValue(\n type,\n index,\n \"RegionId\",\n inputVal?.value\n );\n changeProductGroupsObjValue(\n type,\n index,\n \"RegionName\",\n inputVal?.label\n );\n\n if (inputVal !== null) {\n getDistricts(inputVal?.value);\n }\n clearSelect([\"district\", \"mahalla\"]);\n }}\n placeholder=\"Выберите область\"\n noOptionsMessage={() => \"не найден\"}\n />\n
\n
\n

\n * Район:\n

\n 0}\n isSearchable={true}\n options={districts}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: item[type].DistrictName,\n value: item[type].DistrictCode,\n }}\n onChange={(inputVal) => {\n changeProductGroupsObjValue(\n type,\n index,\n \"DistrictCode\",\n inputVal?.value\n );\n changeProductGroupsObjValue(\n type,\n index,\n \"DistrictName\",\n inputVal?.label\n );\n\n if (inputVal !== null) {\n getMahalla(inputVal?.soato);\n }\n clearSelect([\"mahalla\"]);\n }}\n placeholder=\"Выберите Район\"\n noOptionsMessage={() => \"не найден\"}\n />\n
\n\n
\n Махалля:\n 0}\n isSearchable={true}\n options={mahalla}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: item[type].MahallaName,\n value: item[type].MahallaId,\n }}\n onChange={(inputVal) => {\n changeProductGroupsObjValue(\n type,\n index,\n \"MahallaId\",\n inputVal?.value\n );\n changeProductGroupsObjValue(\n type,\n index,\n \"MahallaName\",\n inputVal?.label\n );\n }}\n placeholder=\"Выберите область\"\n noOptionsMessage={() => \"не найден\"}\n />\n
\n\n
\n

\n * Название улицы:\n

\n {\n changeProductGroupsObjValue(\n type,\n index,\n \"Address\",\n text.target.value\n );\n }}\n value={item[type].Address}\n />\n
\n\n
\n

\n * широта:\n

\n \n
\n\n
\n

\n * долгота:\n

\n \n
\n
\n \n \n );\n});\n\nconst searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".9rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n width: 250,\n height: 35,\n }),\n};\n","import { observer } from \"mobx-react-lite\";\nimport { Col, FormCheckbox, Row } from \"shards-react\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport { useMemo, useState } from \"react\";\nimport Company from \"@api/Company\";\nimport Store from \"./mobx/store\";\n\ntype Props = {\n type: \"LoadingTrustee\" | \"UnloadingTrustee\";\n index: number;\n item: any;\n};\n\nexport const ProductGroupForm2 = observer(({ type, item, index }: Props) => {\n const { obj, changeProductGroupsObjValue, toggleVisibility } = Store;\n const [loading, setLoading] = useState(false);\n // const [visible, setVisible] = useState(false);\n const handleChange = (text: string) => {\n if (!loading && text?.length < 15) {\n console.log(\"kirildi\");\n changeProductGroupsObjValue(type, index, \"Pinfl\", text);\n if (text?.length === 14) {\n setLoading(true);\n Company.fetchInfo(text)\n .then((info) => {\n if (info) {\n changeProductGroupsObjValue(type, index, \"FullName\", info?.Name);\n }\n })\n .finally(() => {\n setLoading(false);\n });\n } else if (text === \"\") {\n changeProductGroupsObjValue(type, index, \"FullName\", \"\");\n }\n }\n };\n\n let visible = useMemo(() => {\n return type === \"LoadingTrustee\"\n ? obj.isVisibleLoadingTrustee\n : obj.isVisibleUnloadingTrustee;\n }, [obj.isVisibleLoadingTrustee, obj.isVisibleUnloadingTrustee]);\n\n return (\n \n \n \n {\n // setVisible((prev) => !prev);\n toggleVisibility(\n type === \"LoadingTrustee\"\n ? \"isVisibleLoadingTrustee\"\n : \"isVisibleUnloadingTrustee\"\n );\n }}\n />\n
\n {type === \"LoadingTrustee\"\n ? \"Загрузка доверенного лица\"\n : \"Разгрузочный управляющий\"}\n
\n \n
\n \n
\n

\n * ПИНФЛ:\n

\n\n \n {loading ? (\n \n ) : item[type].Pinfl?.length !== 14 ? (\n \n ) : null}\n \n }\n type=\"number\"\n placeholder=\"ПИНФЛ\"\n onChange={(text) => {\n if (!loading && text.target.value.trim().length < 15) {\n handleChange(text.target.value.trim());\n }\n }}\n w={200}\n value={item[type].Pinfl}\n />\n
\n
\n

\n * Ф.И.О:\n

\n\n \n
\n \n \n );\n});\n","import { Col, FormCheckbox, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { TextInput } from \"@mantine/core\";\nimport { DatePickerInput } from \"@mantine/dates\";\nimport { useState } from \"react\";\nimport dayjs from \"dayjs\";\nimport Store from \"./mobx/store\";\n\ntype Props = {\n index: number;\n item: any;\n};\n\nexport const UnloadingEmpowerment = observer(({ index, item }: Props) => {\n const { obj, changeProductGroupsObjValue, toggleVisibility } = Store;\n return (\n \n \n \n {\n // setVisible((prev) => !prev);\n toggleVisibility(\"isVisibleUnloadingEmpowerment\");\n }}\n />\n
Доверенность
\n \n
\n \n
\n Доверенность ID:\n {\n changeProductGroupsObjValue(\n \"UnloadingEmpowerment\",\n index,\n \"EmpowermentId\",\n text.target.value\n );\n }}\n w={200}\n value={item.UnloadingEmpowerment.EmpowermentId}\n />\n
\n\n
\n

\n * Номер доверенности:\n

\n {\n changeProductGroupsObjValue(\n \"UnloadingEmpowerment\",\n index,\n \"EmpowermentNo\",\n text.target.value\n );\n }}\n value={item.UnloadingEmpowerment.EmpowermentNo}\n />\n
\n\n
\n
\n

\n * От:\n

\n\n {\n let val = dayjs(value).format(\"YYYY-MM-DD\");\n changeProductGroupsObjValue(\n \"UnloadingEmpowerment\",\n index,\n \"EmpowermentDateOfIssue\",\n val\n );\n }}\n value={new Date(item.UnloadingEmpowerment.EmpowermentDateOfIssue)}\n valueFormat=\"YYYY MMM-DD\"\n placeholder=\"Дата\"\n w={180}\n />\n
\n\n
\n

\n * До:\n

\n\n {\n let val = dayjs(value).format(\"YYYY-MM-DD\");\n changeProductGroupsObjValue(\n \"UnloadingEmpowerment\",\n index,\n \"EmpowermentDateOfExpire\",\n val\n );\n }}\n value={\n new Date(item.UnloadingEmpowerment.EmpowermentDateOfExpire)\n }\n valueFormat=\"YYYY MMM-DD\"\n placeholder=\"Дата\"\n w={180}\n />\n
\n
\n \n \n );\n});\n","import { observer } from \"mobx-react-lite\";\nimport { Col, FormCheckbox, Row } from \"shards-react\";\nimport Store from \"./mobx/store\";\nimport { TextInput } from \"@mantine/core\";\n\ntype Props = {\n item: any;\n index: number;\n};\n\nexport const ProductGroupInfo = observer(({ item, index }: Props) => {\n const { obj, changeProductGroupsObjValue, changeProductGroupsHasCommittent } =\n Store;\n return (\n \n \n \n
\n * Информация о продукте\n
\n \n
\n
\n
\n

\n * Общая сумма доставки:\n

\n {\n changeProductGroupsObjValue(\n \"ProductInfo\",\n index,\n \"TotalDeliverySum\",\n text.target.value\n );\n }}\n w={200}\n value={\n obj.Roadway.ProductGroups[index].ProductInfo.TotalDeliverySum\n }\n />\n
\n
\n

\n * Общий вес Брутто:\n

\n {\n changeProductGroupsObjValue(\n \"ProductInfo\",\n index,\n \"TotalWeightBrutto\",\n text.target.value\n );\n }}\n value={\n obj.Roadway.ProductGroups[index].ProductInfo.TotalWeightBrutto\n }\n />\n
\n
\n {\n let res = Boolean(\n obj.Roadway.ProductGroups[index].ProductInfo.HasCommittent\n );\n changeProductGroupsHasCommittent(!res, index);\n }}\n >\n Имеет обязательства\n \n
\n
\n \n );\n});\n","import { Button, Col, FormInput, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport Store from \"./mobx/store\";\nimport { TextInput } from \"@mantine/core\";\n\nexport const ProductGroupTable = observer(\n ({ index, item }: { index: number; item: any }) => {\n const {\n addProductInfoTable,\n deleteProductInfoTable,\n editProductInfoTable,\n } = Store;\n\n\n\n\n return (\n \n \n
\n
\n * Продукты\n
\n \n \n \n \n\n {item.ProductInfo.HasCommittent && (\n \n )}\n\n {item.ProductInfo.HasCommittent && }\n\n \n \n \n \n \n \n \n \n \n \n {item.ProductInfo.Products?.length > 1 && (\n \n )}\n \n {item.ProductInfo.Products?.map(\n (data: any, dataIndex: number) => {\n return (\n \n \n\n {item.ProductInfo.HasCommittent && (\n \n )}\n\n {item.ProductInfo.HasCommittent && (\n \n )}\n\n \n \n \n \n \n \n \n \n \n \n\n {item.ProductInfo.Products?.length > 1 && (\n \n )}\n \n );\n }\n )}\n
#CommittentTinOrPinflИмя коммитента\n

\n * Наименование\n товара\n

\n
\n

\n * Код каталога\n

\n
\n {\" \"}\n

\n * Название каталога\n

\n
\n

\n * Код пакета\n

\n
\n

\n * Имя пакета\n

\n
\n

\n * Количество\n

\n
\n

\n * Цена\n

\n
\n

\n * Сумма доставки\n

\n
\n

\n * Вес Брутто\n

\n
\n

\n * Вес Нетто\n

\n
{dataIndex + 1}\n {\n editProductInfoTable(\n \"CommittentTinOrPinfl\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.CommittentTinOrPinfl}\n />\n \n {\n editProductInfoTable(\n \"CommittentName\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.CommittentName}\n />\n \n {\n editProductInfoTable(\n \"ProductName\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.ProductName}\n />\n \n {\n editProductInfoTable(\n \"CatalogCode\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.CatalogCode}\n />\n \n {\n editProductInfoTable(\n \"CatalogName\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.CatalogName}\n />\n \n {\n editProductInfoTable(\n \"PackageCode\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.PackageCode}\n />\n \n {\n editProductInfoTable(\n \"PackageName\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.PackageName}\n />\n \n {\n editProductInfoTable(\n \"Amount\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.Amount}\n />\n \n {\n editProductInfoTable(\n \"Price\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.Price}\n />\n \n {\n editProductInfoTable(\n \"DeliverySum\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.DeliverySum}\n />\n \n {\n editProductInfoTable(\n \"WeightBrutto\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.WeightBrutto}\n />\n \n {\n editProductInfoTable(\n \"WeightNetto\",\n index,\n dataIndex,\n text.target.value\n );\n }}\n value={data.WeightNetto}\n />\n \n \n {\n if (item.ProductInfo.Products?.length > 1) {\n deleteProductInfoTable(index, dataIndex);\n }\n }}\n outline\n size=\"sm\"\n theme=\"danger\"\n >\n \n \n \n
\n
\n
\n {\n addProductInfoTable(index);\n }}\n className=\"mr-2\"\n theme=\"success\"\n >\n Добавить продукт\n \n
\n \n \n
\n );\n }\n);\n","import { observer } from \"mobx-react-lite\";\nimport { useState } from \"react\";\nimport { Button, Col, Row } from \"shards-react\";\nimport { ProductGroupForm1 } from \"./ProductGroupForm1\";\nimport { ProductGroupForm2 } from \"./ProductGroupForm2\";\nimport { UnloadingEmpowerment } from \"./UnloadingEmpowerment\";\nimport { ProductGroupInfo } from \"./ProductGroupInfo\";\nimport { ProductGroupTable } from \"./ProductGroupTable\";\nimport Store from \"./mobx/store\";\n\ntype Props = {\n index: number;\n item: any;\n};\n\nexport const ProductGroupItem = observer(({ item, index }: Props) => {\n const { obj, removeGroup } = Store;\n const [minimized, setMinimized] = useState(false);\n const toggleMinimized = () => {\n setMinimized((prev) => !prev);\n };\n\n return (\n \n \n \n
Адрес груза - {index + 1}
\n
\n \n {obj.Roadway.ProductGroups.length > 1 && (\n {\n removeGroup(index);\n }}\n theme=\"danger\"\n >\n удалить\n \n )}\n
\n \n {minimized ? null : (\n <>\n \n \n \n \n \n \n \n \n \n \n )}\n \n \n );\n});\n","import { Button } from \"shards-react\";\nimport { ProductGroupItem } from \"./ProductGroupItem\";\nimport { observer } from \"mobx-react-lite\";\nimport Store from \"./mobx/store\";\n\nexport const ProductGroups = observer(() => {\n const { obj, addNewGroup } = Store;\n\n return (\n <>\n {/*
\n * Группы продуктов\n
*/}\n\n {obj.Roadway.ProductGroups.map((item, index) => {\n return ;\n })}\n <>\n \n \n \n );\n});\n","import { Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { TextInput } from \"@mantine/core\";\nimport { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\nimport Store from \"./mobx/store\";\nimport Company from \"@api/Company\";\n\nexport const RoadwayForm3 = observer(() => {\n const { obj, changeRoadwayObjValue } = Store;\n const [transports, setTransports] = useState([]);\n\n useEffect(() => {\n if (\n obj.Carrier.TinOrPinfl?.length === 9 ||\n obj.Carrier.TinOrPinfl?.length === 14\n ) {\n Company.fetchTransports(obj.Carrier.TinOrPinfl).then((response: any) => {\n let data = response.result?.map((item) => {\n return { label: item.regNo, value: item.model };\n });\n setTransports(data);\n });\n }\n }, [obj.Carrier.TinOrPinfl]);\n\n return (\n \n \n \n
\n * \n Грузовик\n
\n \n
\n\n
\n
\n

\n * \n Гос. номер автомобиля\n

\n 0}\n isSearchable={true}\n options={transports}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: obj.Roadway.Truck.RegNo,\n value: obj.Roadway.Truck.RegNo,\n }}\n onChange={(inputVal) => {\n changeRoadwayObjValue(\"Truck\", \"RegNo\", inputVal?.label || \"\");\n changeRoadwayObjValue(\"Truck\", \"Model\", inputVal?.value || \"\");\n }}\n placeholder=\"Гос. номер автомобиля\"\n noOptionsMessage={() => \"не найден\"}\n />\n
\n
\n

\n * \n Модель автомобиля\n

\n \n
\n
\n \n );\n});\n\nconst searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \".9rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n width: 200,\n height: 35,\n }),\n};\n","import { Row } from \"shards-react\";\nimport { RoadwayForm1 } from \"./RoadwayForm1\";\nimport { RoadwayForm2 } from \"./RoadwayForm2\";\nimport { RoadwayOtherCarOwners } from \"./RoadwayOtherCarOwners\";\nimport { RoadwayCarriages } from \"./RoadwayCarriages\";\nimport { ProductGroups } from \"./ProductGroups\";\nimport { RoadwayForm3 } from \"./RoadwayForm3\";\n\nexport default function Roadway() {\n return (\n <>\n

Информация о транспортировке

\n \n \n \n \n \n \n \n \n \n );\n}\n","import { Col, FormRadio, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { TextInput } from \"@mantine/core\";\nimport { DatePickerInput } from \"@mantine/dates\";\nimport Store from \"./mobx/store\";\nimport dayjs from \"dayjs\";\n\n\nexport const Info = observer(() => {\n const { obj, changeObjValue, changeDeliveryType } = Store;\n return (\n \n \n \n

Тип перевозки

\n \n
\n
\n
\n
\n * Номер товарно-транспортной\n накладной:\n
\n {\n changeObjValue(\"WaybillDoc\", \"WaybillNo\", e.target.value);\n }}\n />\n
\n
\n
\n * Дата документа:\n
\n
\n {\n let val = dayjs(value).format(\"YYYY-MM-DD\");\n changeObjValue(\"WaybillDoc\", \"WaybillDate\", val);\n }}\n value={new Date(obj.WaybillDoc.WaybillDate)}\n valueFormat=\"YYYY MMM-DD\"\n placeholder=\"Дата\"\n mx=\"auto\"\n w={200}\n maw={400}\n />\n
\n
\n \n {\n changeDeliveryType(1);\n }}\n >\n От склада до склада\n \n\n {\n changeDeliveryType(2);\n }}\n >\n От продавца до покупателя\n \n
\n\n {obj.DeliveryType === 2 ? (\n <>\n
\n
\n * Номер контракта:\n
\n {\n changeObjValue(\"ContractDoc\", \"ContractNo\", e.target.value);\n }}\n w={200}\n className=\"mb-1\"\n value={obj.ContractDoc.ContractNo}\n />\n
\n
\n
\n * Дата контракта:\n
\n
\n {\n let val = dayjs(value).format(\"YYYY-MM-DD\");\n changeObjValue(\"ContractDoc\", \"ContractDate\", val);\n }}\n value={new Date(obj.ContractDoc.ContractDate)}\n valueFormat=\"YYYY-MM-DD\"\n placeholder=\"Дата\"\n mx=\"auto\"\n w={200}\n maw={400}\n />\n
\n
\n \n ) : null}\n \n \n );\n});\n","import { Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport { SelectOptionType } from \"@models\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport Select from \"react-select\";\nimport Company from \"@api/Company\";\nimport Store from \"./mobx/store\";\nimport useAuth from \"@hooks/Auth/useAuth\";\n\ntype Props = {\n type: \"Consignor\" | \"Consignee\" | \"FreightForwarder\" | \"Carrier\";\n};\n\nconst getText = (\n type: \"Consignor\" | \"Consignee\" | \"FreightForwarder\" | \"Carrier\"\n) => {\n switch (type) {\n case \"Consignor\":\n return { name: \"Грузоотправитель\", index: 1 };\n case \"Consignee\":\n return { name: \"Грузополучатель\", index: 2 };\n case \"FreightForwarder\":\n return { name: \"Экспедитор\", index: 3 };\n case \"Carrier\":\n return { name: \"Грузоперевозчик\", index: 4 };\n default:\n return type;\n }\n};\n\nexport const Form1 = observer(({ type }: Props) => {\n const { profile } = useAuth();\n const { obj, changeObjValue } = Store;\n const [loading, setLoading] = useState(false);\n const [branches, setBranches] = useState([]);\n\n const getBranchesAndInfo = async (value: string) => {\n setLoading(true);\n try {\n const branches = await Company.fetchBranches(value);\n const info = await Company.fetchInfo(value);\n changeObjValue(type, \"Name\", info.Name);\n setBranches(\n branches.map((branch) => ({\n value: branch.branchNum,\n actualLabel: branch.branchName,\n label: `${branch.branchNum} - ${branch.branchName}`,\n }))\n );\n } catch (error) {\n notifyError(error);\n }\n setLoading(false);\n };\n\n useEffect(() => {\n if (\n obj[type].TinOrPinfl?.length === 9 ||\n obj[type].TinOrPinfl?.length === 14\n ) {\n getBranchesAndInfo(obj[type].TinOrPinfl);\n }\n\n if (obj[type].TinOrPinfl?.trim() === \"\") {\n changeObjValue(type, \"Name\", \"\");\n }\n }, [obj[type].TinOrPinfl]);\n\n useEffect(() => {\n if (obj.DeliveryType === 1) {\n changeObjValue(\"Consignor\", \"TinOrPinfl\", profile.pinfl);\n changeObjValue(\"Consignee\", \"TinOrPinfl\", profile.pinfl);\n } else if (obj.DeliveryType === 2) {\n changeObjValue(\"Consignor\", \"TinOrPinfl\", profile.pinfl);\n changeObjValue(\"Consignee\", \"TinOrPinfl\", \"\");\n }\n }, [obj.DeliveryType]);\n\n const CustomLoader = ({ value }: { value: string }) => {\n return (\n <>\n {loading ? (\n \n ) : value?.length !== 9 && value?.length !== 14 ? (\n \n ) : null}\n \n );\n };\n\n const inputColor = useMemo(() => {\n if (type === \"Consignor\") {\n return \"filled\";\n } else if (type === \"Consignee\") {\n if (obj.DeliveryType === 1) {\n return \"filled\";\n } else {\n return \"default\";\n }\n } else {\n return \"default\";\n }\n }, [type, obj.DeliveryType]);\n\n return (\n <>\n \n \n \n

{getText(type).name}

\n \n
\n
\n
\n

\n * ИНН / ПИНФЛ:\n

\n {\n if (\n !loading &&\n inputColor === \"default\" &&\n text.target.value.trim().length < 15\n ) {\n changeObjValue(type, \"TinOrPinfl\", text.target.value.trim());\n }\n }}\n w={200}\n value={obj[type].TinOrPinfl}\n rightSection={}\n />\n
\n
\n

\n * Название компании:\n

\n \n
\n\n
\n Название филиала:\n
\n 0}\n isSearchable={true}\n options={branches}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: `${obj[type].BranchCode}${obj[type].BranchName}`,\n value: obj[type].BranchCode,\n }}\n onChange={(inputVal) => {\n let label = inputVal?.actualLabel || \"\";\n let branchCode = inputVal?.value || \"\";\n\n changeObjValue(type, \"BranchName\", label);\n changeObjValue(type, \"BranchCode\", branchCode);\n }}\n placeholder=\"Выберите филиал\"\n noOptionsMessage={() => \"Филиал не найден\"}\n />\n
\n \n \n );\n});\n\nexport const searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \"1rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n width: 200,\n }),\n};\n","import { Col, FormCheckbox, Row } from \"shards-react\";\nimport { SelectOptionType } from \"@models\";\nimport { observer } from \"mobx-react-lite\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport { DatePickerInput } from \"@mantine/dates\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport Select from \"react-select\";\nimport Store from \"./mobx/store\";\nimport dayjs from \"dayjs\";\nimport Company from \"@api/Company\";\n\ntype Props = {\n type: \"Client\" | \"Payer\";\n};\n\nexport const Form2 = observer(({ type }: Props) => {\n const { obj, changeObjValue, toggleVisibility } = Store;\n\n const [loading, setLoading] = useState(false);\n const [branches, setBranches] = useState([]);\n\n const getBranchesAndInfo = async (value: string) => {\n setLoading(true);\n try {\n const branches = await Company.fetchBranches(value);\n const info = await Company.fetchInfo(value);\n changeObjValue(type, \"Name\", info.Name);\n setBranches(\n branches.map((branch) => ({\n value: branch.branchNum,\n actualLabel: branch.branchName,\n label: `${branch.branchNum} - ${branch.branchName}`,\n }))\n );\n } catch (error) {\n console.log(error);\n notifyError(error);\n }\n setLoading(false);\n };\n\n let visible = useMemo(() => {\n return type === \"Client\" ? obj.isVisibleClient : obj.isVisiblePayer;\n }, [obj.isVisibleClient,obj.isVisiblePayer]);\n\n useEffect(() => {\n if (\n obj[type].TinOrPinfl?.length === 9 ||\n obj[type].TinOrPinfl?.length === 14\n ) {\n getBranchesAndInfo(obj[type].TinOrPinfl);\n }\n\n if (obj[type].TinOrPinfl?.trim() === \"\") {\n changeObjValue(type, \"Name\", \"\");\n }\n }, [obj[type].TinOrPinfl]);\n\n const CustomLoader = ({ value }: { value: string }) => {\n return (\n <>\n {loading ? (\n \n ) : value?.length !== 9 && value?.length !== 14 ? (\n \n ) : null}\n \n );\n };\n\n return (\n \n \n \n {\n toggleVisibility(\n type === \"Client\" ? \"isVisibleClient\" : \"isVisiblePayer\"\n );\n }}\n />\n

{type === \"Client\" ? \"Клиент\" : \"Плательщик\"}

\n \n
\n \n
\n

\n * Номер контракта:\n

\n {\n changeObjValue(type, \"ContractNo\", text.target.value);\n }}\n w={200}\n value={obj[type].ContractNo}\n />\n
\n\n
\n

\n * Дата контракта:\n

\n {\n let val = dayjs(value).format(\"YYYY-MM-DD\");\n changeObjValue(type, \"ContractDate\", val);\n }}\n value={new Date(obj[type].ContractDate)}\n valueFormat=\"YYYY MMM-DD\"\n placeholder=\"Дата\"\n w={200}\n maw={400}\n />\n
\n\n
\n

\n * ИНН / ПИНФЛ:\n

\n {\n changeObjValue(type, \"TinOrPinfl\", text.target.value);\n }}\n w={200}\n value={obj[type].TinOrPinfl}\n rightSection={}\n />\n
\n
\n

\n * Название компании:\n

\n \n
\n
\n Название филиала:\n
\n\n 0}\n isSearchable={true}\n options={branches}\n styles={searchableSelectStyles}\n components={{\n DropdownIndicator: () => null,\n IndicatorSeparator: () => null,\n }}\n value={{\n label: `${obj[type].BranchCode}${obj[type].BranchName}`,\n value: obj[type].BranchCode,\n }}\n onChange={(inputVal) => {\n let label = inputVal?.actualLabel || \"\";\n let branchCode = inputVal?.value || \"\";\n\n changeObjValue(type, \"BranchName\", label);\n changeObjValue(type, \"BranchCode\", branchCode);\n }}\n placeholder=\"Выберите филиал\"\n noOptionsMessage={() => \"Филиал не найден\"}\n />\n \n \n );\n});\n\nexport const searchableSelectStyles = {\n valueContainer: (provided) => ({\n ...provided,\n padding: \".4286em .625em\",\n fontSize: \"1rem\",\n lineHeight: 1.5,\n borderRadius: \".25rem\",\n width: 190,\n }),\n};\n","import { Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Loader, TextInput } from \"@mantine/core\";\nimport { useEffect, useState } from \"react\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport Store from \"./mobx/store\";\nimport Company from \"@api/Company\";\n\nexport const ResponsiblePerson = observer(() => {\n const { obj, changeObjValue } = Store;\n const [loading, setLoading] = useState(false);\n\n const getBranchesAndInfo = async (value: string) => {\n setLoading(true);\n try {\n const info = await Company.fetchInfo(value);\n changeObjValue(\"ResponsiblePerson\", \"FullName\", info.Name);\n } catch (error) {\n notifyError(error);\n }\n setLoading(false);\n };\n\n useEffect(() => {\n if (obj.ResponsiblePerson.Pinfl?.length === 14) {\n getBranchesAndInfo(obj.ResponsiblePerson.Pinfl);\n }\n if (obj.ResponsiblePerson.Pinfl === \"\") {\n changeObjValue(\"ResponsiblePerson\", \"FullName\", \"\");\n }\n }, [obj.ResponsiblePerson.Pinfl]);\n\n const CustomLoader = ({ value }: { value: string }) => {\n return (\n <>\n {loading ? (\n \n ) : value?.length !== 14 ? (\n \n ) : null}\n \n );\n };\n\n return (\n \n \n \n

Ответственный лицо

\n \n
\n
\n
\n

\n * ПИНФЛ:\n

\n {\n if (!loading && text.target.value.trim().length < 15) {\n changeObjValue(\n \"ResponsiblePerson\",\n \"Pinfl\",\n text.target.value.trim()\n );\n }\n }}\n w={200}\n value={obj.ResponsiblePerson.Pinfl}\n rightSection={}\n />\n
\n
\n

\n * Ф.И.О:\n

\n \n
\n
\n \n );\n});\n","import Roadway from \"./Roadway\";\nimport { Button, Col, Row } from \"shards-react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Info } from \"./Info\";\nimport { Form1 } from \"./Form1\";\nimport { Form2 } from \"./Form2\";\nimport { ResponsiblePerson } from \"./ResponsiblePerson\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { TypesValidObject } from \"./types\";\nimport { useEffect } from \"react\";\nimport Store from \"./mobx/store\";\n\nexport const WayBillNew = observer(() => {\n const { obj, resetStore } = Store;\n // useEffect(() => {\n // return () => {\n // resetStore()\n // }\n // }, [])\n\n const dataValidation = () => {\n try {\n // @ts-ignore\n let validObj: TypesValidObject = {};\n\n validObj.WaybillLocalId = \"\";\n\n validObj.WaybillDoc = {\n ...obj.WaybillDoc,\n };\n\n validObj.DeliveryType = obj.DeliveryType;\n\n if (obj.DeliveryType === 1) {\n validObj.ContractDoc = null;\n } else {\n validObj.ContractDoc = { ...obj.ContractDoc };\n }\n\n if (\n obj.Consignor.TinOrPinfl.length === 9 ||\n obj.Consignor.TinOrPinfl.length === 14\n ) {\n validObj.Consignor = { ...obj.Consignor };\n validObj.Consignor.BranchCode = obj.Consignor.BranchCode || null;\n validObj.Consignor.BranchName = obj.Consignor.BranchName || null;\n } else {\n throw new Error(\"Consignor\");\n }\n\n if (\n obj.Consignee.TinOrPinfl.length === 9 ||\n obj.Consignee.TinOrPinfl.length === 14\n ) {\n validObj.Consignee = { ...obj.Consignee };\n validObj.Consignee.BranchCode = obj.Consignee.BranchCode || null;\n validObj.Consignee.BranchName = obj.Consignee.BranchName || null;\n } else {\n throw new Error(\"Consignee\");\n }\n\n if (\n obj.FreightForwarder.TinOrPinfl.length === 9 ||\n obj.FreightForwarder.TinOrPinfl.length === 14\n ) {\n validObj.FreightForwarder = { ...obj.FreightForwarder };\n validObj.FreightForwarder.BranchCode =\n obj.FreightForwarder.BranchCode || null;\n validObj.FreightForwarder.BranchName =\n obj.FreightForwarder.BranchName || null;\n } else {\n throw new Error(\"FreightForwarder\");\n }\n\n if (\n obj.Carrier.TinOrPinfl.length === 9 ||\n obj.Carrier.TinOrPinfl.length === 14\n ) {\n validObj.Carrier = { ...obj.Carrier };\n validObj.Carrier.BranchCode = obj.Carrier.BranchCode || null;\n validObj.Carrier.BranchName = obj.Carrier.BranchName || null;\n } else {\n throw new Error(\"Carrier\");\n }\n\n if (obj.isVisibleClient) {\n if (\n obj.Client.TinOrPinfl.length === 9 ||\n obj.Client.TinOrPinfl.length === 14\n ) {\n validObj.Client = { ...obj.Client };\n validObj.Client.BranchCode = obj.Client.BranchCode || null;\n validObj.Client.BranchName = obj.Client.BranchName || null;\n } else {\n throw new Error(\"Client\");\n }\n } else {\n validObj.Client = null;\n }\n\n if (obj.isVisiblePayer) {\n if (\n obj.Payer.TinOrPinfl.length === 9 ||\n obj.Payer.TinOrPinfl.length === 14\n ) {\n validObj.Payer = { ...obj.Payer };\n validObj.Payer.BranchCode = obj.Payer.BranchCode || null;\n validObj.Payer.BranchName = obj.Payer.BranchName || null;\n } else {\n throw new Error(\"Payer\");\n }\n } else {\n validObj.Payer = null;\n }\n\n if (obj.ResponsiblePerson.Pinfl.length === 14) {\n validObj.ResponsiblePerson = { ...obj.ResponsiblePerson };\n } else {\n throw new Error(\"ResponsiblePerson\");\n }\n\n validObj.TransportType = 1;\n validObj.Airway = null;\n validObj.Railway = null;\n validObj.Shipway = null;\n\n // @ts-ignore\n validObj.Roadway = {};\n validObj.Roadway.OtherCarOwners = [];\n // ------- roadway\n\n if (obj.Roadway.OtherCarOwners.length > 0) {\n obj.Roadway.OtherCarOwners.forEach((item) => {\n if (item.TinOrPinfl.length === 9 || item.TinOrPinfl.length === 14) {\n validObj.Roadway.OtherCarOwners?.push({ ...item });\n } else {\n throw new Error(\"OtherCarOwners\");\n }\n });\n } else {\n validObj.Roadway.OtherCarOwners = null;\n }\n\n if (obj.Roadway.Driver.Pinfl.length === 14) {\n validObj.Roadway.Driver = { ...obj.Roadway.Driver };\n } else {\n throw new Error(\"Driver\");\n }\n\n if (obj.Roadway.Truck.RegNo.length > 0) {\n validObj.Roadway.Truck = { ...obj.Roadway.Truck };\n } else {\n throw new Error(\"Truck\");\n }\n\n if (obj.isVisibleTrailer) {\n if (obj.Roadway.Trailer.RegNo.length > 0) {\n validObj.Roadway.Trailer = { ...obj.Roadway.Trailer };\n } else {\n throw new Error(\"Trailer\");\n }\n } else {\n validObj.Roadway.Trailer = null;\n }\n\n if (obj.Roadway.Carriages.length > 0) {\n validObj.Roadway.Carriages = null; // hozircha null\n } else {\n validObj.Roadway.OtherCarOwners = null;\n }\n\n validObj.Roadway.ProductGroups = [];\n\n obj.Roadway.ProductGroups.forEach((item, index) => {\n let tempLoadingPoint: any,\n tempUnloadingPoint: any,\n tempLoadingTrustee: any,\n tempUnloadingTrustee: any,\n tempUnloadingEmpowerment: any,\n tempProductInfo: any;\n\n if (\n item.LoadingPoint.RegionId &&\n item.LoadingPoint.RegionName &&\n item.LoadingPoint.DistrictCode &&\n item.LoadingPoint.DistrictName &&\n item.LoadingPoint.Address &&\n item.LoadingPoint.Latitude &&\n item.LoadingPoint.Longitude\n ) {\n tempLoadingPoint = {\n ...item.LoadingPoint,\n MahallaId: item.LoadingPoint.MahallaId || null,\n MahallaName: item.LoadingPoint.MahallaName || null,\n };\n } else {\n throw new Error(\"LoadingPoint,\" + index);\n }\n\n if (\n item.UnloadingPoint.RegionId &&\n item.UnloadingPoint.RegionName &&\n item.UnloadingPoint.DistrictCode &&\n item.UnloadingPoint.DistrictName &&\n item.UnloadingPoint.Address &&\n item.UnloadingPoint.Latitude &&\n item.UnloadingPoint.Longitude\n ) {\n tempUnloadingPoint = {\n ...item.UnloadingPoint,\n MahallaId: item.LoadingPoint.MahallaId || null,\n MahallaName: item.LoadingPoint.MahallaName || null,\n };\n } else {\n throw new Error(\"UnloadingPoint,\" + index);\n }\n\n if (obj.isVisibleLoadingTrustee) {\n if (item.LoadingTrustee.Pinfl.length === 14) {\n tempLoadingTrustee = { ...item.LoadingTrustee };\n } else {\n throw new Error(\"LoadingTrustee,\" + index);\n }\n }\n\n if (obj.isVisibleUnloadingTrustee) {\n if (item.UnloadingTrustee.Pinfl.length === 14) {\n tempUnloadingTrustee = { ...item.UnloadingTrustee };\n } else {\n throw new Error(\"UnloadingTrustee,\" + index);\n }\n }\n\n if (obj.isVisibleUnloadingEmpowerment) {\n if (\n item.UnloadingEmpowerment.EmpowermentId &&\n item.UnloadingEmpowerment.EmpowermentNo\n ) {\n tempUnloadingEmpowerment = { ...item.UnloadingEmpowerment };\n } else {\n throw new Error(\"UnloadingEmpowerment,\" + index);\n }\n } else {\n tempUnloadingEmpowerment = null;\n }\n\n tempProductInfo = { ...item.ProductInfo, Products: [] };\n\n item.ProductInfo.Products.forEach((item, rowIndex) => {\n if (\n item.ProductName &&\n item.CatalogCode &&\n item.CatalogName &&\n item.PackageCode &&\n item.PackageName &&\n item.Amount &&\n item.Price &&\n item.DeliverySum &&\n item.WeightBrutto &&\n item.WeightNetto\n ) {\n tempProductInfo.Products.push({\n ...item,\n CommittentTinOrPinfl: item.CommittentTinOrPinfl || null,\n CommittentName: item.CommittentName || null,\n });\n } else {\n throw new Error(`Products,${index},${rowIndex}`);\n }\n });\n \n validObj.Roadway.ProductGroups.push({\n ...tempLoadingPoint,\n ...tempUnloadingPoint,\n ...tempLoadingTrustee,\n ...tempUnloadingTrustee,\n ...tempUnloadingEmpowerment,\n ...tempProductInfo,\n });\n });\n\n // --- the end\n console.log(validObj, \" valid Obj\");\n } catch (error) {\n let message = error?.message.split(\",\");\n let index = message[1];\n let rowIndex = message[2];\n\n let element: any, element2: any;\n if (rowIndex) {\n element = document.getElementById(`id_${message[0]}_${index}`);\n element2 = document.getElementById(\n `id_${message[0]}_${index}_row_${rowIndex}`\n );\n } else if (index) {\n element = document.getElementById(`id_${message[0]}_${index}`);\n element2 = document.getElementById(`id_${message[0]}_${index}_div`);\n } else {\n element = document.getElementById(`id_${message[0]}`);\n element2 = document.getElementById(`id_${message[0]}_div`);\n }\n\n console.log(element2, element, index, message);\n\n if (element2) {\n element2.classList.add(\"redBorder\");\n setTimeout(() => {\n element2.classList.remove(\"redBorder\");\n }, 1500);\n }\n\n if (element) {\n element.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n inline: \"nearest\",\n });\n }\n }\n };\n\n return (\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n\n \n \n \n Предварительный просмотр\n \n \n \n \n );\n});\n","import React from \"react\";\nimport { useState } from \"react\";\nimport { Row, Container, Col, FormSelect } from \"shards-react\";\nimport Factura from \"./factura/Factura\";\nimport Empowerment from \"./empowerment/Empowerment\";\nimport Act from \"./act/Act\";\nimport { PDF } from \"./pdf/pdf\";\nimport { useSelector } from \"@hooks\";\nimport { Preview } from \"./Preview\";\nimport Custom from \"./custom/Custom\";\nimport VerificationAct from \"./verificationAct/VerificationAct\";\nimport Contract from \"./contract/Contract\";\nimport { FacturaContextProvider } from \"./factura/FacturaContext\";\nimport WayBill from \"./wayBill/WayBill\";\nimport { WayBillNew } from \"./wayBillNew/WayBillNew\";\n// import WayBillNew from \"./wayBillNew/WayBillNew\";\n\nconst spcBetween = {\n justifyContent: \"space-between\",\n};\n\nconst CreateDoc = (props) => {\n const [docType, setDocType] = useState(\n props.docType ? props.docType : \"Фактура\"\n );\n const { docIsBeingCopied, docIsPreviewed } = useSelector(\n (state) => state.docCreateReducer\n );\n\n return (\n \n {docIsPreviewed && }\n {!docIsBeingCopied && (\n \n \n setDocType(e.target.value)}>\n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n \n );\n};\n\nexport default CreateDoc;\n\nfunction CreateDocBody({ docType, setCurDoc, setNewDoc }) {\n switch (docType) {\n case \"Фактура\":\n return (\n \n \n \n );\n case \"Акт\":\n return ;\n case \"Акт сверки\":\n return ;\n case \"Доверенность\":\n return ;\n case \"Договор\":\n return ;\n case \"PDF\":\n return ;\n case \"HTML\":\n return ;\n case \"ТТН\":\n return ;\n case \"TTHNEW\":\n return \n default:\n return

{docType}

;\n }\n}\n","import CreateDoc from \"@components/CreateDoc\";\nimport withModal from \"@utils/hoc/withModal\";\nimport { useEffect } from \"react\";\nimport { ModalHeader, ModalBody, Modal } from \"shards-react\";\n\ntype PropsType = {\n onClose: Function;\n setNewDoc;\n curDoc;\n setCurDoc;\n};\n\nconst CreateDocModal = (props: PropsType) => {\n const { onClose, setNewDoc, curDoc, setCurDoc } = props;\n\n const handleClose = () => {\n onClose();\n };\n\n useEffect(() => {\n document.body.style.overflowY = \"hidden\";\n\n return () => {\n document.body.style.overflowY = \"unset\";\n };\n }, []);\n\n return (\n \n \n Создание документа\n \n \n \n \n \n );\n};\n\nexport default withModal(CreateDocModal);\n","import { useState, useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { Button } from \"shards-react\";\nimport { LSelect } from \"../../common/UtilComponents\";\nimport { setObjectState } from \"@utils/helpers\";\nimport { ModalHeader, ModalBody, Modal } from \"shards-react\";\nimport Settings from \"../../Settings/Settings\";\n\nimport { ImportFromXLS } from \"../../ImportDoc/ImportFromXLS\";\nimport \"./header.css\";\nimport { docCreateActions } from \"@redux/actions\";\n\nimport Logo from \"@assets/images/logo.svg\";\nimport Hamburger from \"@assets/images/ham.png\";\nimport Cog from \"@assets/images/cog.png\";\nimport ProductList from \"../../ProductList/ProductList\";\nimport CreateDocModal from \"../Modals/CreateDocModal\";\nimport makeStyles from \"@utils/styles/makeStyles\";\nimport { useSelector } from \"@hooks\";\n\nconst Header = (props) => {\n const { classes } = useStyles();\n const dispatch = useDispatch();\n\n const [showSettings, setShowSettings] = useState(false);\n const [confirmModalOpen, setConfirmModalOpen] = useState(false);\n const [importXLS, setImportXLS] = useState(false);\n const [showList, setShowList] = useState(false);\n\n const { formChanged, docIsBeingCopied } = useSelector(\n (state) => state.docCreateReducer\n );\n const { needToReload } = useSelector((state) => state.docsTableReducer);\n\n const [newDoc, setNewDoc] = useState(false);\n\n const onCloseShowListHandler = () => {\n setShowList((prev) => !prev);\n };\n\n const handleCreateModalClose = () => {\n if (newDoc && formChanged) setConfirmModalOpen(true);\n else {\n setNewDoc(!newDoc);\n dispatch(docCreateActions.requestDocCreateByCopyFinished());\n props.setCurDoc(null);\n }\n };\n\n const handleClose = () => {\n setConfirmModalOpen(false);\n };\n\n useEffect(() => {\n setConfirmModalOpen(false);\n }, [needToReload]);\n\n useEffect(() => {\n setNewDoc(docIsBeingCopied);\n }, [docIsBeingCopied]);\n\n const ListEl = showList && (\n \n \n Список\n \n \n \n \n \n );\n\n const SettingsEl = showSettings && (\n setShowSettings(!showSettings)}\n >\n setShowSettings(!showSettings)}\n >\n Сервис\n \n \n \n \n \n );\n\n const confirmModal = (\n \n \n Внимание!\n \n \n

\n Документ не был сохранён! В случае закрытия формы, все введенные\n данные будут потеряны.\n

\n {\n setConfirmModalOpen(false);\n setNewDoc(!newDoc);\n dispatch(docCreateActions.requestDocCreateByCopyFinished());\n dispatch(docCreateActions.closedDocCreateForm());\n props.setCurDoc(null);\n }}\n >\n Закрыть\n \n \n Назад\n \n
\n \n );\n\n const importExcel = !importXLS ? null : (\n setImportXLS(!importXLS)}\n >\n setImportXLS(!importXLS)}>\n Импортировать документ\n \n \n \n \n \n );\n\n return (\n <>\n {ListEl}\n {SettingsEl}\n {importExcel}\n {confirmModal}\n\n \n
\n
\n \"L-Factura\"\n \n setObjectState(props.filter, props.setFilter, \"dir\", e)\n }\n />\n \n setObjectState(props.filter, props.setFilter, \"docType\", e)\n }\n />\n\n \n\n setShowSettings(true)}\n className={classes.icon}\n src={Cog}\n alt=\"service\"\n />\n setNewDoc(true)}\n >\n Создать документ\n \n\n setImportXLS(true)}\n >\n Импорт\n \n\n {!props.sidePinned ? (\n props.setShowSide(!props.showSide)}\n className={classes.icon}\n src={Hamburger}\n />\n ) : null}\n
\n
\n \n );\n};\n\nexport default Header;\n\nconst useStyles = makeStyles(() => ({\n container: {\n height: \"74px\",\n backgroundColor: \"#FAFBFC\",\n display: \"flex\",\n alignItems: \"center\",\n },\n\n logo: {\n height: \"40px\",\n width: \"100x\",\n margin: \"auto\",\n marginLeft: \"-6px\",\n },\n\n row: {\n display: \"flex\",\n width: \"90%\",\n alignItems: \"center\",\n margin: \"0 auto\",\n },\n\n icon: {\n height: \"20px\",\n margin: \"auto\",\n marginLeft: \"20px\",\n marginRight: \"20px\",\n cursor: \"pointer\",\n },\n}));\n\nconst docTypes = [\n { value: \"all\", view: \"Все документы\" },\n { value: \"Фактура\", view: \"Счет фактуры\" },\n { value: \"Доверенность\", view: \"Доверенности\" },\n { value: \"Акт\", view: \"Акты\" },\n { value: \"АктСверки\", view: \"Акты сверки\" },\n { value: \"Договор\", view: \"Договор\" },\n { value: \"ПДФ\", view: \"PDF\" },\n { value: \"ХТМЛ\", view: \"HTML\" },\n];\n\nconst dirs = [\n { value: \"inbox\", view: \"Входящие\" },\n { value: \"outbox\", view: \"Исходящие\" },\n { value: \"draft\", view: \"Черновики\" },\n];\n","import { useEffect } from \"react\";\nimport { useDispatch } from \"@hooks\";\nimport { fetchBalance } from \"@redux/thunks\";\n\nimport walletIcon from \"@assets/images/icons/wallet.png\";\nimport docIcon from \"@assets/images/icons/docPage.png\";\nimport refreshIcon from \"@assets/images/icons/refresh.png\";\nimport { Button } from \"shards-react\";\nimport { useSelector } from \"@hooks\";\nimport styled from \"styled-components\";\n\nconst Balance = ({ setPaymentModalIsOpen, setPromoModalOpen }) => {\n const dispatch = useDispatch();\n const { balance } = useSelector((state) => state.balanceReducer);\n\n const onPaymentClicked = () => {\n setPaymentModalIsOpen(true);\n };\n\n const onPromoClicked = () => {\n setPromoModalOpen(true);\n };\n\n const onBalanceFetched = () => {\n dispatch(fetchBalance());\n };\n\n useEffect(() => {\n onBalanceFetched();\n }, []);\n\n return (\n
\n
\n
\n \n \n {numberWithSpaces(balance.money)} UZS\n \n
\n
\n \n \n {numberWithSpaces(balance.tarif)} шт.\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n );\n};\n\nexport default Balance;\n\nconst BalanceData = styled.span`\n position: relative;\n margin-left: 20px;\n text-align: left;\n font-size: 13px;\n`;\n\nconst UsdIcon = styled.img`\n position: absolute;\n width: 20px;\n height: 20px;\n`;\n\nconst RefreshIcon = styled.img`\n width: 20px;\n height: 20px;\n cursor: pointer;\n`;\n\nfunction numberWithSpaces(x) {\n if (x) return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \");\n return 0;\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAD30lEQVR4Xu2bXYhMYRjH/8/Zj7hQuwrro0S05kxEkQsULiw3QomdWaHdORIXlM/kI0mUuFDKOUSxM9jydWF9FUpuuKDM2RVC8rGILYl2d86jM3aYXXbnzJxxPnbeczvveZ//8zvP+zzv+5wzhAK/qMD9hwAgIqAbgbAWr2HGAhCmE2iIlwEx405UkWfa0fh7CSw93jxMSiROE9EsOxM6fW99RLa1jH/fHNbidwGaxuAWYqmuTTLuNdQFPzvtkFV7YU1nc2xeAIQ0vZaAY8z4JDEmnF4lv7MqxK1xeQUQVuNXQDTPAIVikUDMLaeysZtXACFV7w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0C046PmsSrRsGbIqBOUi+2YJ88S0T3L6bYQrHMfMHpKH6io6Eyuth8ht+BzMQ+PzumhMgruVwtMuMmg46c8t7danY3M00gTcjM5S7Ao2AEYg5u727YOrpY1U1to3pFFrxeByeZMArQMIF7Uin+vOZqbY/RXUavbs4O6BXI93iBQL4V1stfcEBPoXyPFxzIt8J6+Ze9A/8CMGHXQB775dAAAAAASUVORK5CYII=\"","import React from \"react\";\n\nexport default function Filter() {\n return (\n \n \n \n \n \n \n \n \n );\n}\n","import { DatePicker } from \"shards-react\";\nimport styled from \"styled-components\";\n\nexport const DatePickerLavina = (props) => (\n \n);\n\nconst DatePickerStyled = styled(DatePicker)`\n display: flex;\n width: 80%;\n font-size: 12px;\n background: none;\n border: none;\n border-left: 1px solid red;\n padding: 0;\n color: #7681a1;\n`;\n","export function KeySelect(props) {\n const count = props.values.length;\n\n var DivRStyle = {\n position: \"absolute\",\n width: \"\" + 100 / count + \"%\",\n height: \"calc(100% - 3px)\",\n top: \"1.5px\",\n transition: \"0.5s\",\n left: \"0\",\n zIndex: \"12\",\n borderRadius: \"12px\",\n background: \"#fff\",\n border: \"1px solid #ecf2f4\",\n boxShadow: \"0px 0px 1px #5E7389\",\n };\n\n let childrenBody = [];\n\n props.values.forEach((elem, i) => {\n let selectedDiv = (\n props.onChange(elem.key)}\n style={selectedDivStyle}\n >\n

{elem.view}

\n \n );\n\n let div = (\n props.onChange(elem.key)}\n style={divStyle}\n >\n

{elem.view}

\n \n );\n\n childrenBody.push(\n String(elem.key) === String(props.selected) ? div : selectedDiv\n );\n if (String(elem.key) === String(props.selected)) {\n DivRStyle = { ...DivRStyle, left: \"\" + (i * 100) / count + \"%\" };\n }\n });\n\n let DivR =
;\n\n return (\n
\n {childrenBody}\n {DivR}\n
\n );\n}\nconst wrapStyle = {\n display: \"flex\",\n position: \"relative\",\n width: \"100%\",\n background: \"#F5F7FA\",\n color: \"#7681A1\",\n cursor: \"pointer\",\n height: \"100%\",\n overflow: \"hidden\",\n margin: \"0 auto\",\n borderRadius: \"12px\",\n};\nconst divStyle = {\n width: \"50%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n fontSize: \"14px\",\n alignItems: \"center\",\n transition: \"2s\",\n};\n\nconst selectedDivStyle = {\n width: \"50%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n fontSize: \"14px\",\n alignItems: \"center\",\n transition: \"1s\",\n};\nconst pStyle = {\n margin: \"0\",\n fontSize: \"12px\",\n transition: \"1s\",\n display: \"block\",\n zIndex: \"999\",\n};\nconst tStyle = {\n margin: \"0\",\n fontSize: \"12px\",\n display: \"block\",\n zIndex: \"999\",\n color: \"#1795E9\",\n};\n","import styled from \"styled-components\";\n\nexport function SummType(props) {\n const onInputChanged = (e) => {\n props.onChange(e.target.value);\n };\n\n return (\n \n );\n}\n\nconst StyledInput = styled.input`\n width: 40%;\n border: 0;\n color: #6d7980;\n padding-left: 5px;\n`;\n","import moment from \"moment\";\nimport FilterIcon from \"../../../assets/Icons/Filter\";\nimport { LSelect } from \"../../common/UtilComponents\";\nimport { setObjectState } from \"../../../utils/helpers\";\nimport { DatePickerLavina } from \"./DatePickerLavina\";\nimport { KeySelect } from \"../KeySelect\";\nimport { SummType } from \"./SummType\";\nimport styled from \"styled-components\";\n\nconst Filter = (props) => {\n const { filter, setFilter, status } = props;\n\n const handleFilterChange = (key, value) => {\n setObjectState(filter, setFilter, key, value);\n };\n\n const handleInputChange = (key) => (e) => {\n handleFilterChange(key, e.target.value);\n };\n\n const handleValueChange = (key) => (value) => {\n handleFilterChange(key, value);\n };\n\n const handleDateChange = (key, type?) => (date) => {\n const value =\n type === \"end\" ? moment(date.getTime()).endOf(\"day\").toDate() : date;\n\n handleFilterChange(key, value);\n handleFilterChange(\"filterDate\", true);\n };\n\n return (\n
\n
\n \n <FilterIcon /> Фильтр документов\n \n \n \n \n
\n \n \n \n \n
\n \n
\n
\n \n \n c \n |\n \n \n \n по \n |\n \n \n \n \n

\n По сумме\n

\n
\n \n
\n
\n \n \n \n от \n |\n \n {funname(filter.summType)}\n \n \n до \n |\n \n {funname(filter.summType)}\n \n \n \n
\n );\n};\n\nexport default Filter;\n\nconst Title = styled.h2`\n font-size: 14px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: #1795e9;\n font-weight: 500;\n`;\n\nconst SumRow = styled.div`\n display: flex;\n align-items: center;\n border: 1px solid #ecf2f4;\n width: 40%;\n border-radius: 10px;\n padding: 0 7px;\n height: 33px;\n margin: 0 auto;\n\n & span {\n font-size: 13px;\n margin-right: 3px;\n }\n`;\n\nconst SumValue = styled.p`\n margin: 0;\n color: #7681a1;\n margin-bottom: 0;\n`;\n\nconst InputStyled = styled.input`\n width: 90%;\n height: 35px;\n border-radius: 8px;\n border: 1px solid #ecf2f4;\n margin: 10px auto;\n color: #7681a1;\n margin-bottom: 0;\n display: flex;\n text-align: center;\n transition: border-color 0.1s ease-in-out;\n\n &:focus {\n border-color: #1795e9;\n }\n`;\n\nconst RowToolBar = styled.div`\n width: 100%;\n margin: 0 auto;\n margin-bottom: 25px;\n display: flex;\n align-items: center;\n`;\n\nconst Row = styled.div`\n display: flex;\n justify-content: space-around;\n width: 100%;\n color: #bbc0d0;\n margin: 10px auto;\n margin-bottom: 30px;\n`;\n\nconst Newbar = styled.div`\n display: flex;\n align-items: center;\n border: 1px solid #ecf2f4;\n width: 40%;\n border-radius: 10px;\n padding: 0 7px;\n margin: 0 auto;\n`;\n\nfunction funname(elem) {\n let name;\n\n if (elem === \"K\" || elem === \"k\") name = \"тыс\";\n else {\n if (elem === \"m\") {\n name = \"млн\";\n }\n name = \"млрд\";\n }\n\n return ${name};\n}\n\nconst dateAmount = [\n { key: \"k\", view: \"тыс\" },\n { key: \"m\", view: \"млн\" },\n { key: \"b\", view: \"млрд\" },\n];\n\nconst dateTypes = [\n { key: \"document\", view: \"дата документа\" },\n { key: \"create\", view: \"дата создания\" },\n];\n","class Common {\n lavinaTin = 306851622\n}\n\nexport default new Common()","import { useDispatch } from \"@hooks\";\nimport { Button, Col, Container, Row } from \"shards-react\";\nimport {\n fetchCompaniesSuccess,\n setCompanyAuto,\n} from \"../../../redux/actions/companies\";\nimport { requestCompanyInfoSet } from \"../../../redux/thunks\";\nimport StatusBlock from \"../../common/StatusBlock\";\nimport Balance from \"./Balance\";\nimport { useSelector } from \"../../../utils/hooks\";\nimport styled from \"styled-components\";\nimport Filter from \"./Filter\";\nimport useAuth from \"@hooks/Auth/useAuth\";\nimport { initialProfile } from \"@utils/constants/Auth\";\nimport Company from \"@api/Company\";\nimport { notifyError } from \"@utils/helpers/toast\";\nimport Common from \"@utils/constants/Common\";\n\nexport function SideBar(props) {\n const {\n filterDefault,\n filter,\n setFilter,\n sidePinned,\n setSidePinned,\n setShowSide,\n logOut,\n setPaymentModalIsOpen,\n setPromoModalOpen,\n } = props;\n\n const { profile, setProfile } = useAuth();\n\n const textBtnPanel = sidePinned ? \"Скрыть панель\" : \"Прикрепить панель\";\n\n const { providerIsSet, providers } = useSelector(\n (state) => state.companiesReducer\n );\n\n const dispatch = useDispatch();\n\n const onPayerNameClicked = () => {\n dispatch(setCompanyAuto(false));\n setProfile(initialProfile);\n };\n\n const onProviderSelected = () => {\n Company.setProvider({\n ClientTin: profile.tin,\n ProviderTins: [...providers, Common.lavinaTin],\n })\n .then(() => {\n dispatch(requestCompanyInfoSet(profile.tin));\n })\n .catch(notifyError);\n };\n\n const onNoAuthClicked = () => {\n if (!providerIsSet) onProviderSelected();\n };\n\n const onResetClicked = () => {\n setFilter({ ...filterDefault });\n };\n\n const onLogoutClicked = () => {\n dispatch(setCompanyAuto(true));\n dispatch(fetchCompaniesSuccess([]));\n logOut();\n };\n\n const onPinClicked = () => {\n setSidePinned(!sidePinned);\n setShowSide(false);\n };\n\n return (\n \n \n {profile.name}\n
\n {profile.pinfl ? \"ПИНФЛ: \" : \"ИНН: \"}{\" \"}\n {profile.pinfl ? profile.pinfl : profile.tin}\n
\n {}\n
\n \n
\n
\n
\n \n
\n \n \n Сбросить\n \n \n \n \n Выйти\n \n \n \n \n {textBtnPanel}\n \n \n \n
\n );\n}\n\nconst MainContainer = styled.div`\n height: 100%;\n background-color: #fff;\n align-items: center;\n min-height: 100vh;\n box-shadow: -2px 0px 4px rgba(9, 51, 96, 0.12);\n transform: translateX(0%);\n transition: 0.3s;\n`;\n\nconst PayerName = styled(Container)`\n padding: 10px;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n background: #fafbfc;\n border-bottom: 1px solid #ecf2f4;\n cursor: pointer;\n`;\n\nconst ResetButton = styled(Button)`\n height: 40px;\n width: 90%;\n margin: auto;\n display: block;\n font-size: 16px;\n`;\n\nconst status = [\n { value: \"all\", view: \"Все статусы\" },\n { value: \"Отправить\", view: \"Отправленые\" },\n { value: \"Подтвердить\", view: \"Принятые\" },\n { value: \"Отказать\", view: \"Отказаные\" },\n { value: \"Отменить\", view: \"Отмененые\" },\n];\n","import React from \"react\";\n\nexport function Status(props) {\n let name;\n let style;\n if (props.values === \"Подтвердить\") {\n name = \"Подписан\";\n style = {\n background: \"#EEFFE6\",\n color: \"#31CD18\",\n padding: \"10px\",\n minWidth: \"118px\",\n height: \"35px\",\n display: \"flex\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n if (props.values === \"ПодтвердитьОЛ\") {\n name = \"Подписан ОЛ\";\n style = {\n background: \"#EEFFE6\",\n color: \"#31CD18\",\n padding: \"10px\",\n minWidth: \"118px\",\n fontSize: \"12px\",\n height: \"35px\",\n display: \"flex\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n if (props.values === \"Отменить\") {\n name = \"Отменен\";\n style = {\n background: \"#F5F7FA\",\n color: \"#7681A1\",\n padding: \"10px\",\n minWidth: \"118px\",\n height: \"35px\",\n cursor: \"pointer\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n if (props.values === \"Отправить\") {\n name = \"Отправлен\";\n style = {\n background: \"#F1F7FF\",\n color: \"#1795E9\",\n padding: \"10px\",\n minWidth: \"118px\",\n cursor: \"pointer\",\n height: \"35px\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n if (props.values === \"Отказать\") {\n name = \"Отказан\";\n style = {\n background: \"#FFEBEB\",\n color: \"#D52C69\",\n cursor: \"pointer\",\n padding: \"10px\",\n minWidth: \"118px\",\n height: \"35px\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n\n if (props.values === \"Черновик\") {\n name = \"Сохранен\";\n style = {\n background: \"#F5F7FA\",\n color: \"#7681A1\",\n padding: \"10px\",\n minWidth: \"118px\",\n height: \"35px\",\n cursor: \"pointer\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n\n if (props.values === \"ОтказатьОЛ\") {\n name = \"Отказан ОЛ\";\n style = {\n background: \"#FFEBEB\",\n color: \"#D52C69\",\n cursor: \"pointer\",\n padding: \"10px\",\n fontSize: \"12px\",\n minWidth: \"118px\",\n height: \"35px\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: \"52px\",\n };\n }\n\n if (props.isText) return name;\n\n return
{name}
;\n}\n","import { useMemo, useState } from \"react\";\nimport { Status } from \"../status\";\nimport { useSelector, useDispatch } from \"@hooks\";\nimport { changeSortByColumn } from \"../../../redux/actions/docsTable\";\nimport { toCurrency } from \"../../../utils/helpers\";\n\nexport function Table({ values = [], active, setActive, setCurDoc }) {\n let [allRowsActive, setAllRowsActive] = useState(false);\n const { columnsToShow } = useSelector((state) => state.docsTableReducer);\n const dispatch = useDispatch();\n\n // console.log(values);\n\n const showTotal = useMemo(() => {\n if (values.length)\n return values.reduce((a, b) => {\n let correct = b.total.replace(/\\s/g, \"\");\n correct = correct.replace(/,/, \".\");\n correct = +correct;\n return a + correct;\n }, 0);\n return null;\n }, [values]);\n\n return (\n
\n
\n
\n
\n {\n toggleAllRowsActive(values, active, setActive, allRowsActive);\n setAllRowsActive(!allRowsActive);\n }}\n >
\n \n Контрагент\n
\n
\n