@@ -120,15 +120,15 @@ discard block |
||
| 120 | 120 | 'igvPercent' => SunatVars::IGV_PERCENT, |
| 121 | 121 | 'logo' => LogoMgr::getLogoString(), |
| 122 | 122 | 'qr' => QrGenerator::getQrString($dataMap), // QR Code |
| 123 | - 'taxableOperations' => Operations::formatAmount($dataMap->getTotalTaxableOperations()), // Total operaciones gravadas |
|
| 124 | - 'freeOperations' => Operations::formatAmount($dataMap->getTotalFreeOperations()), // Total operaciones gratuitas |
|
| 123 | + 'taxableOperations' => Operations::formatAmount($dataMap->getTotalTaxableOperations()), // Total operaciones gravadas |
|
| 124 | + 'freeOperations' => Operations::formatAmount($dataMap->getTotalFreeOperations()), // Total operaciones gratuitas |
|
| 125 | 125 | 'unaffectedOperations' => Operations::formatAmount($dataMap->getTotalUnaffectedOperations()), // Total operaciones inafectas |
| 126 | - 'exemptedOperations' => Operations::formatAmount($dataMap->getTotalExemptedOperations()), // Total operaciones exoneradas |
|
| 127 | - 'totalAllowances' => Operations::formatAmount($dataMap->getTotalAllowances()), // Total operaciones exoneradas |
|
| 128 | - 'igvAmount' => Operations::formatAmount($dataMap->getIGV()), // Total a pagar |
|
| 129 | - 'payableAmount' => Operations::formatAmount($payableAmount), // Total a pagar |
|
| 130 | - 'payableInWords' => $payableInWords, // Monto en palabras |
|
| 131 | - 'items' => self::getReadyToPrintDataItems($dataMap), // Items |
|
| 126 | + 'exemptedOperations' => Operations::formatAmount($dataMap->getTotalExemptedOperations()), // Total operaciones exoneradas |
|
| 127 | + 'totalAllowances' => Operations::formatAmount($dataMap->getTotalAllowances()), // Total operaciones exoneradas |
|
| 128 | + 'igvAmount' => Operations::formatAmount($dataMap->getIGV()), // Total a pagar |
|
| 129 | + 'payableAmount' => Operations::formatAmount($payableAmount), // Total a pagar |
|
| 130 | + 'payableInWords' => $payableInWords, // Monto en palabras |
|
| 131 | + 'items' => self::getReadyToPrintDataItems($dataMap), // Items |
|
| 132 | 132 | 'noteType' => $dataMap->getNoteType(), |
| 133 | 133 | 'affectedDocumentId' => $dataMap->getNoteAffectedDocId(), |
| 134 | 134 | 'affectedDocumentOficialName' => Catalogo::getOfficialDocumentName($dataMap->getNoteAffectedDocType()), |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $ln = $Items->getCount(); |
| 142 | 142 | $items2 = []; |
| 143 | 143 | for ($i = 0; $i < $ln; $i++) { |
| 144 | - $items2[]= [ |
|
| 144 | + $items2[] = [ |
|
| 145 | 145 | 'productCode' => $Items->getProductCode($i), |
| 146 | 146 | 'quantity' => $Items->getQunatity($i), |
| 147 | 147 | 'unitName' => Catalogo::getUnitName($Items->getUnitCode($i)), |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | {
|
| 108 | 108 | $xmlObj = simplexml_load_string($response); |
| 109 | 109 | // Ticket |
| 110 | - $ticket = (string) $xmlObj->xpath("//ticket")[0];
|
|
| 110 | + $ticket = (string)$xmlObj->xpath("//ticket")[0];
|
|
| 111 | 111 | Repository::saveTicket($documentName, $ticket); |
| 112 | 112 | return $ticket; |
| 113 | 113 | } |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | $dueDate = $inv->getDueDate(); |
| 88 | 88 | $formOfPayment = $inv->getFormOfPayment(); |
| 89 | 89 | $formOfPaymentSrt = ""; |
| 90 | - if($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CONTADO) { |
|
| 90 | + if ($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CONTADO) { |
|
| 91 | 91 | $formOfPaymentSrt = "CONTADO"; |
| 92 | - }elseif($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CREDITO) { |
|
| 92 | + }elseif ($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CREDITO) { |
|
| 93 | 93 | $formOfPaymentSrt = "CRÉDITO"; |
| 94 | 94 | } |
| 95 | 95 | $data = [ |
@@ -111,18 +111,18 @@ discard block |
||
| 111 | 111 | 'igvPercent' => SunatVars::IGV_PERCENT, |
| 112 | 112 | 'logo' => LogoMgr::getLogoString(), |
| 113 | 113 | 'qr' => QrGenerator::getQrString($inv), // QR Code |
| 114 | - 'taxableOperations' => $inv->getTotalTaxableOperations(), // Total operaciones gravadas |
|
| 115 | - 'freeOperations' => $inv->getTotalFreeOperations(), // Total operaciones gratuitas |
|
| 114 | + 'taxableOperations' => $inv->getTotalTaxableOperations(), // Total operaciones gravadas |
|
| 115 | + 'freeOperations' => $inv->getTotalFreeOperations(), // Total operaciones gratuitas |
|
| 116 | 116 | 'unaffectedOperations' => $inv->getTotalUnaffectedOperations(), // Total operaciones inafectas |
| 117 | - 'exemptedOperations' => $inv->getTotalExemptedOperations(), // Total operaciones exoneradas |
|
| 118 | - 'totalAllowances' => $inv->getTotalAllowances(), // Total operaciones exoneradas |
|
| 119 | - 'igvAmount' => $inv->getIGV(), // IGV |
|
| 120 | - 'payableAmount' => $payableAmount, // Total a pagar |
|
| 121 | - 'formOfPaymentStr' => $formOfPaymentSrt, // Forma de pago |
|
| 122 | - 'pendingAmount' => $inv->getPendingAmount(), // Forma de pago |
|
| 123 | - 'payableInWords' => $payableInWords, // Monto en palabras |
|
| 124 | - 'items' => self::getDocumentDataItems($inv), // Items |
|
| 125 | - 'installments' => self::getDocumentInstallments($inv), // Cuotas |
|
| 117 | + 'exemptedOperations' => $inv->getTotalExemptedOperations(), // Total operaciones exoneradas |
|
| 118 | + 'totalAllowances' => $inv->getTotalAllowances(), // Total operaciones exoneradas |
|
| 119 | + 'igvAmount' => $inv->getIGV(), // IGV |
|
| 120 | + 'payableAmount' => $payableAmount, // Total a pagar |
|
| 121 | + 'formOfPaymentStr' => $formOfPaymentSrt, // Forma de pago |
|
| 122 | + 'pendingAmount' => $inv->getPendingAmount(), // Forma de pago |
|
| 123 | + 'payableInWords' => $payableInWords, // Monto en palabras |
|
| 124 | + 'items' => self::getDocumentDataItems($inv), // Items |
|
| 125 | + 'installments' => self::getDocumentInstallments($inv), // Cuotas |
|
| 126 | 126 | ]; |
| 127 | 127 | // For credit and debit notes |
| 128 | 128 | if (in_array($inv->getDocumentType(), [Catalogo::DOCTYPE_NOTA_CREDITO, Catalogo::DOCTYPE_NOTA_DEBITO])) { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $ln = $Items->getCount(); |
| 145 | 145 | $items2 = []; |
| 146 | 146 | for ($i = 0; $i < $ln; $i++) { |
| 147 | - $items2[]= [ |
|
| 147 | + $items2[] = [ |
|
| 148 | 148 | 'productCode' => $Items->getProductCode($i), |
| 149 | 149 | 'quantity' => $Items->getQunatity($i), |
| 150 | 150 | 'unitName' => Catalogo::getUnitName($Items->getUnitCode($i)), |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | $formOfPaymentSrt = ""; |
| 90 | 90 | if($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CONTADO) { |
| 91 | 91 | $formOfPaymentSrt = "CONTADO"; |
| 92 | - }elseif($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CREDITO) { |
|
| 92 | + } elseif($formOfPayment == Catalogo::FAC_FORM_OF_PAYMENT_CREDITO) { |
|
| 93 | 93 | $formOfPaymentSrt = "CRÉDITO"; |
| 94 | 94 | } |
| 95 | 95 | $data = [ |