import{a as e}from"./chunk-IAPRSXGC.js";import{a as n,b as l}from"./chunk-DRQJ626T.js";l();var s=function(r){return r[r.POS=0]="POS",r[r.Wholesale=1]="Wholesale",r[r.ReceivedBills=2]="ReceivedBills",r[r.IssuedAdvancePayment=3]="IssuedAdvancePayment",r[r.ReceivingAdvancePayment=4]="ReceivingAdvancePayment",r[r.BuyerOrder=5]="BuyerOrder",r[r.SupplierOrder=6]="SupplierOrder",r[r.Documents=7]="Documents",r[r.Orders=8]="Orders",r[r.Goods=9]="Goods",r[r.Transfer=10]="Transfer",r[r.PriceChange=11]="PriceChange",r[r.Inventory=12]="Inventory",r[r.WorkOrder=13]="WorkOrder",r[r.TravelOrder=14]="TravelOrder",r[r.Plan=15]="Plan",r[r.Customs=16]="Customs",r[r.Excise=17]="Excise",r[r.Money=18]="Money",r[r.Wage=19]="Wage",r[r.PayOrder=20]="PayOrder",r[r.CashTransaction=21]="CashTransaction",r[r.Issue=22]="Issue",r[r.Receive=23]="Receive",r[r.Archive=24]="Archive",r[r.AdvancePayment=25]="AdvancePayment",r[r.InventoryExcess=26]="InventoryExcess",r[r.InventoryShortage=27]="InventoryShortage",r}(s||{});var i=class{static statusColorCoding(a){switch(a){case"P":return"success";case"N":return"warning";default:return"neutral"}}static statusColor(a){switch(a){case"P":return"paw-status-success";case"R":return"neutral";case"N":return"paw-status-warning"}return""}static statusIcon(a){switch(a){case"P":return"far fa-check";case"R":return"far fa-check";case"N":return"far fa-exclamation-triangle"}return""}static wayOfSaleText(a){switch(a){case e.FinalBuyer:return"FinalBuyer";case e.IsTaxComitted:return"IsTaxCommitedShort";case e.ExportSale:return"ExportSale";case e.ExportSaleEU:return"ExportSaleEU";case e.DomesticTaxpayers:return"DomesticTaxpayers";case e.Flatrate:return"Flatrate";case e.OtherNotTaxComitted:return"";case e.R1:return"WayOfSaleBuyerR1";case e.R2:return"WayOfSaleR2";case e.RS:return"SerbianRepublic";case e.BiH:return"FederationBiH";case e.BrckoDistrictBiH:return"BrckoDistrictBiH";case e.Import:return"Import";case e.ImportEU:return"ImportEU";case e.Nonresident:return"Nonresident";case e.DiplomaticConsulate:return"WayOfSaleDiplomaticConsulate";case e.Other:return"Other";default:return""}}static wayOfSaleColor(a){switch(a){case e.FinalBuyer:return"green";case e.IsTaxComitted:return"turquoise";case e.ExportSale:return"cyan";case e.ExportSaleEU:return"pink";case e.DomesticTaxpayers:return"orange";case e.Flatrate:return"yellow";case e.OtherNotTaxComitted:return"";case e.R1:return"green";case e.R2:return"yellow";case e.RS:return"pink";case e.BiH:return"blue";case e.BrckoDistrictBiH:return"purple";case e.Import:return"dark-pink";case e.ImportEU:return"pink";case e.Nonresident:return"red";case e.DiplomaticConsulate:return"purple";case e.Other:return"no-fill";default:return""}}static getLink(a,t){switch(a){case s.POS:return`${n.backofficeUrl}CashRegister/Index?acKey=`+t;case s.Wholesale:return`${n.backofficeUrl}Wholesale/Edit?id=`+t;case s.ReceivedBills:return`${n.backofficeUrl}ReceivedBills/Edit?id=`+t;case s.IssuedAdvancePayment:return`${n.backofficeUrl}AdvancePayment/EditIssuedAdvancePayment?id=`+t;case s.ReceivingAdvancePayment:case s.AdvancePayment:return`${n.backofficeUrl}AdvancePayment/EditReceivingAdvancePayment?id=`+t;case s.Orders:case s.BuyerOrder:return`${n.backofficeUrl}Order/EditBuyerOrder?id=`+t;case s.SupplierOrder:return`${n.backofficeUrl}Order/EditSupplierOrder?id=`+t;case s.Documents:case s.Archive:return`${n.backofficeUrl}Documents/Edit?qId=`+t;case s.InventoryExcess:return`${n.backofficeUrl}Inventory/ExcessOrMissing?inventoryType=E&id=`+t;case s.InventoryShortage:return`${n.backofficeUrl}Inventory/ExcessOrMissing?inventoryType=S&id=`+t}return""}static toInvoiceItem(a,t){return{ident:a?.ident,name:a?.name,quantity:a?.quantity,price:a?.price,discount:a?.contractPriceRabate,serialNo:a?.serialNo,acKey:t,anNo:1}}static identSearchResultToInvoiceItem(a,t,c){return{ident:t?.ident,name:t?.name,quantity:t?.quantity,price:t?.price,rabate:t?.contractPriceRabate,serialNo:t?.serialNo,acKey:c,anNo:a.length>0?a[a.length-1].anNo+1:1}}};export{i as a};
