{{$invoice->key}} {{$invoice->consecutive_number }} {{ \Carbon\Carbon::parse($invoice->date.' '.$invoice->times)->format('Y-m-d\TH:i:s-06:00') }} {{ sysconf()->name }} {{ sysconf()->type_of_cedula }} {{ sysconf()->id_number_atv }} {{ sysconf()->neighborhood->code_province }} {{ sysconf()->neighborhood->code_canton }} {{ sysconf()->neighborhood->code_district }} {{ sysconf()->direction }} {{ sysconf()->email }} @if(($sale->viewed)==1) {{ $sale->customer_name }} {{ $sale->type_of_cedula }} {{ $sale->card }} @if(strlen($sale->email)>0) {{ $sale->email }} @endif @else {{ $customer->company_name }} {{ $customer->id_type }} {{ $customer->card }} @if(strlen($customer->fantasy_name)>0) {{ $customer->fantasy_name }} @endif @if($customer->phone != null || $customer->phone != "") 506 {{ $customer->phone }} @endif @if(strlen($customer->email)>0) {{ $customer->email }} @endif @endif {{ $invoice->sale_condition }} @if($invoice->sale_condition == '02' ) {{ $customer->credit_time }} @else 00 @endif {{ $invoice->way_to_pay }} @php $count = 1; @endphp @foreach($invoice->products AS $product) {{ $count }} {{ $product->type_code }} {{ $product->barcode }} {{ ($product->pivot->amount) }} {{ $product->saleMethod->code }} {{ $product->description }} {{ ($product->pivot->price) }} {{ ($product->pivot->m_total) }} @if($product->pivot->m_dicount > 0) {{ ($product->pivot->m_dicount)}} monto de descuentos concedidos @endif {{($product->pivot->subtotal) }} @if (($product->product_type_id) == 1) {{ $product->typeTax->code }} {{ $product->pivot->rate }} {{ ($product->pivot->m_tax)}} @if(false) {{ $impuesto->getTipoDocumento() }} {{ $impuesto->getNumeroDocumento() }} {{ $impuesto->getNombreInstitucion() }} {{ ($impuesto->getFechaEmision()) }} {{ $impuesto->getMontoImpuesto() }} {{ $impuesto->getPorcentajeCompra() }} @endif @endif {{($product->pivot->total)}} @endforeach CRC 1 @if($invoice->total_serv_exempt > 0) {{ ($invoice->total_serv_exempt) }} @endif @if($invoice->total_serv_tax > 0) {{ ($invoice->total_serv_tax) }} @endif @if($invoice->total_merca_tax > 0) {{ ($invoice->total_merca_tax) }} @endif @if($invoice->total_merca_exempt > 0) {{ ($invoice->total_merca_exempt) }} @endif @if( $invoice->subtotal_taxed > 0) {{ ($invoice->subtotal_taxed) }} @endif @if( $invoice->subtotal_exempt > 0) {{ ($invoice->subtotal_exempt) }} @endif {{ ($invoice->total_sale) }} @if( $invoice->discount > 0) {{ ($invoice->discount) }} @endif {{ ($invoice->total_sale_neta) }} {{ ($invoice->total_tax) }} {{ ($invoice->total_voucher) }} @if(false) @endif DGT-R-48-2016 07-10-2016 00:00:00 -- ATV Comprobante Electrónico --