PageSourceSearch

https://foodfinder.mx/chunk-NEHTUCZB.js

js foodfinder.mx collected 2026-09-25 03:44:16 UTC 7,785 bytes, 3 lines download raw bytes

1import{a as L}from"./chunk-F3F4KY2J.js";import{b as P,m as _}from"./chunk-BTGS7UQC.js";import"./chunk-H4QOO6OK.js";import"./chunk-KQ64G6NT.js";import"./chunk-75RZFELW.js";import"./chunk-TCMZHPVP.js";import"./chunk-4QOKRR5P.js";import"./chunk-AYDJ2M35.js";import"./chunk-LWIDYNC2.js";import"./chunk-VXGHG3J7.js";import"./chunk-4RZZDUFM.js";import{a as D}from"./chunk-DMKEOHTA.js";import{s as M}from"./chunk-OLEMAAA2.js";import"./chunk-RZAKCWA5.js";import"./chunk-WPSUQLBS.js";import{f as F,h as w,i as C,k as R}from"./chunk-XYTVABNA.js";import"./chunk-VVTDXABX.js";import{$b as b,Bb as l,Ja as f,Ka as e,La as t,Va as h,fb as i,gb as c,ha as r,hb as m,ib as S,jc as E,kc as I,nc as y,pa as u,ua as g,za as v,zb as d}from"./chunk-VKOZ2CK3.js";import"./chunk-TAAAIZHL.js";import{e as B}from"./chunk-EQDQRRRY.js";var p=B(D());function T(s,x){if(s&1&&(e(0,"tr",28)(1,"td",29),i(2),t(),e(3,"td",17),i(4),t(),e(5,"td",18),i(6),d(7,"number"),t(),e(8,"td",30),i(9),d(10,"number"),t()()),s&2){let n=x.$implicit;r(2),c(n.description),r(2),c(n.quantity),r(2),m(" $",l(7,4,n.unitPrice,"1.2-2")," "),r(3),m(" $",l(10,7,n.total,"1.2-2")," ")}}function j(s,x){if(s&1&&(e(0,"div",31)(1,"span"),i(2),t(),e(3,"span"),i(4),d(5,"number"),t()()),s&2){let n=x.$implicit;r(2),c(n.etiqueta),r(2),m("-",l(5,2,n.importe,"1.2-2"))}}var X=(()=>{class s{route;router;invoiceService;issuer={legalName:"Restaurante",rfc:"RFC_EMISOR",taxRegimeCode:"601"};customer={};paymentFormLabel="";today=new Date;orderId;customerFiscalId;paymentFormCode;isLoading=!1;items=[];subtotal=0;taxes=0;retenciones=[];retenido=0;total=0;constructor(n,o,a){this.route=n,this.router=o,this.invoiceService=a}ngOnInit(){let n=this.route.snapshot.paramMap.get("orderId"),o=this.route.snapshot.paramMap.get("customerFiscalId"),a=this.route.snapshot.paramMap.get("paymentFormCode");if(!n||!o){p.default.fire("Error","Datos incompletos para facturar","error"),this.router.navigate(["/invoices"]);return}this.orderId=Number(n),this.customerFiscalId=Number(o),this.paymentFormCode=String(a),this.loadPreview()}loadPreview(){this.isLoading=!0,this.invoiceService.previewInvoice(this.orderId,this.customerFiscalId,this.paymentFormCode).subscribe({next:n=>{let o=n.preview;this.issuer=o.issuer,this.customer=o.customer,this.items=o.items,this.subtotal=o.subtotal,this.taxes=o.taxes,this.retenciones=o.retenciones||[],this.retenido=o.retenido||0,this.total=o.total,this.paymentFormLabel=o.paymentMethod==="PUE"?"Pago en una sola exhibici\xF3n":"",this.isLoading=!1},error:n=>{this.isLoading=!1,p.default.fire("Error",n?.error?.message||"No se pudo generar la vista previa","error")}})}confirmInvoice(){p.default.fire({icon:"warning",title:"\xBFTimbrar factura?",text:"Esta acci\xF3n no se puede deshacer",showCancelButton:!0,confirmButtonText:"S\xED, timbrar",cancelButtonText:"Cancelar",confirmButtonColor:"#16a34a"}).then(n=>{n.isConfirmed&&this.timbrarFactura()})}timbrarFactura(){this.isLoading=!0,console.log("Creating invoice with:",this.orderId,this.customerFiscalId,this.paymentFormCode),this.invoiceService.createInvoice(this.orderId,this.customerFiscalId,this.paymentFormCode).subscribe({next:n=>{this.isLoading=!1,p.default.fire({icon:"success",title:"Factura timbrada",html:`
2            <p><strong>Correo enviado correctamente a:</strong> ${n.invoice.recipient.email}\u{1F4C4}</p>
3          `,confirmButtonColor:"#16a34a"}),this.router.navigate(["/invoiceorders"])},error:n=>{this.isLoading=!1,p.default.fire("Error",n?.error?.message||"Error al timbrar la factura","error")}})}static \u0275fac=function(o){return new(o||s)(u(F),u(w),u(L))};static \u0275cmp=g({type:s,selectors:[["app-invoice-preview"]],decls:104,vars:28,consts:[[1,"px-6","py-8","max-w-6xl","mx-auto","space-y-8"],[1,"flex","items-center","justify-between"],[1,"text-2xl","font-semibold","text-gray-800"],[1,"text-sm","text-gray-500"],[1,"inline-flex","rounded-full","bg-yellow-100","px-3","py-1","text-xs","font-semibold","text-yellow-700"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-6"],[1,"bg-white","rounded-xl","shadow","p-5","space-y-1"],[1,"text-sm","font-semibold","text-gray-700","uppercase"],[1,"text-sm","font-medium","text-gray-900"],[1,"text-sm","text-gray-600"],[1,"bg-white","rounded-xl","shadow","p-5","grid","grid-cols-1","md:grid-cols-3","gap-4","text-sm"],[1,"text-gray-500"],[1,"font-medium"],[1,"bg-white","rounded-xl","shadow","overflow-hidden"],[1,"w-full","text-sm"],[1,"bg-gray-100","text-gray-600"],[1,"px-4","py-3","text-left"],[1,"px-4","py-3","text-center"],[1,"px-4","py-3","text-right"],["class","border-t",4,"ngFor","ngForOf"],[1,"bg-white","rounded-xl","shadow","p-6","flex","justify-end"],[1,"w-full","max-w-sm","space-y-2","text-sm"],[1,"flex","justify-between"],["class","flex justify-between text-red-600",4,"ngFor","ngForOf"],[1,"flex","justify-between","text-lg","font-semibold","border-t","pt-2"],[1,"flex","justify-between","items-center","pt-4"],["routerLink","/invoiceorders",1,"text-sm","text-gray-500","hover:text-gray-700"],[1,"inline-flex","items-center","rounded-lg","bg-green-600","px-6","py-3","text-sm","font-semibold","text-white","hover:bg-green-700","transition",3,"click"],[1,"border-t"],[1,"px-4","py-3"],[1,"px-4","py-3","text-right","font-medium"],[1,"flex","justify-between","text-red-600"]],template:function(o,a){o&1&&(e(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),i(4," Vista previa de factura CFDI 4.0 "),t(),e(5,"p",3),i(6," Revisa cuidadosamente la informaci\xF3n antes de timbrar "),t()(),e(7,"span",4),i(8," Documento sin validez fiscal "),t()(),e(9,"div",5)(10,"div",6)(11,"h3",7),i(12," Emisor "),t(),e(13,"p",8),i(14),t(),e(15,"p",9),i(16),t(),e(17,"p",9),i(18),t()(),e(19,"div",6)(20,"h3",7),i(21," Receptor "),t(),e(22,"p",8),i(23),t(),e(24,"p",9),i(25),t(),e(26,"p",9),i(27),t(),e(28,"p",9),i(29),t(),e(30,"p",9),i(31),t()()(),e(32,"div",10)(33,"div")(34,"span",11),i(35,"Serie"),t(),e(36,"p",12),i(37,"F"),t()(),e(38,"div")(39,"span",11),i(40,"Forma de pago"),t(),e(41,"p",12),i(42),t()(),e(43,"div")(44,"span",11),i(45,"M\xE9todo de pago"),t(),e(46,"p",12),i(47,"PUE"),t()(),e(48,"div")(49,"span",11),i(50,"Moneda"),t(),e(51,"p",12),i(52,"MXN"),t()(),e(53,"div")(54,"span",11),i(55,"Tipo de comprobante"),t(),e(56,"p",12),i(57,"Ingreso (I)"),t()(),e(58,"div")(59,"span",11),i(60,"Fecha de emisi\xF3n"),t(),e(61,"p",12),i(62),d(63,"date"),t()()(),e(64,"div",13)(65,"table",14)(66,"thead",15)(67,"tr")(68,"th",16),i(69,"Concepto"),t(),e(70,"th",17),i(71,"Cantidad"),t(),e(72,"th",18),i(73,"Precio Unit."),t(),e(74,"th",18),i(75,"Importe"),t()()(),e(76,"tbody"),v(77,T,11,10,"tr",19),t()()(),e(78,"div",20)(79,"div",21)(80,"div",22)(81,"span",11),i(82,"Subtotal"),t(),e(83,"span"),i(84),d(85,"number"),t()(),e(86,"div",22)(87,"span",11),i(88,"IVA (16%)"),t(),e(89,"span"),i(90),d(91,"number"),t()(),v(92,j,6,5,"div",23),e(93,"div",24)(94,"span"),i(95,"Total"),t(),e(96,"span"),i(97),d(98,"number"),t()()()(),e(99,"div",25)(100,"button",26),i(101," \u2190 Volver "),t(),e(102,"button",27),h("click",function(){return a.confirmInvoice()}),i(103," Timbrar factura "),t()()()),o&2&&(r(14),m(" ",a.issuer.legalName," "),r(2),m(" RFC: ",a.issuer.rfc," "),r(2),m(" R\xE9gimen Fiscal: ",a.issuer.taxRegimeCode," "),r(5),m(" ",a.customer.businessName," "),r(2),m(" RFC: ",a.customer.rfc," "),r(2),m(" R\xE9gimen: ",a.customer.taxRegimeCode," "),r(2),m(" Uso CFDI: ",a.customer.cfdiUseCode," "),r(2),m(" CP: ",a.customer.postalCode," "),r(11),S(" ",a.paymentFormCode," - ",a.paymentFormLabel," "),r(20),c(l(63,16,a.today,"short")),r(15),f("ngForOf",a.items),r(7),m("$",l(85,19,a.subtotal,"1.2-2")),r(6),m("$",l(91,22,a.taxes,"1.2-2")),r(2),f("ngForOf",a.retenciones),r(5),m("$",l(98,25,a.total,"1.2-2")))},dependencies:[y,b,M,P,_,R,C,E,I],encapsulation:2})}return s})();export{X as InvoicePreviewComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.