joenilson /
fsRepublicaDominicana
| 1 | <?php |
||
| 2 | /* |
||
| 3 | * Copyright (C) 2023 Joe Nilson <[email protected]> |
||
| 4 | * |
||
| 5 | * This program is free software: you can redistribute it and/or modify |
||
| 6 | * it under the terms of the GNU Lesser General Public License as |
||
| 7 | * published by the Free Software Foundation, either version 3 of the |
||
| 8 | * License, or (at your option) any later version. |
||
| 9 | * |
||
| 10 | * This program is distributed in the hope that it will be useful, |
||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 13 | * GNU Lesser General Public License for more details. |
||
| 14 | * You should have received a copy of the GNU Lesser General Public License |
||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 16 | */ |
||
| 17 | |||
| 18 | namespace FacturaScripts\Plugins\fsRepublicaDominicana\Mod; |
||
| 19 | |||
| 20 | use FacturaScripts\Core\Model\Base\BusinessDocument; |
||
|
0 ignored issues
–
show
|
|||
| 21 | use FacturaScripts\Core\Model\Base\BusinessDocumentLine; |
||
|
0 ignored issues
–
show
The type
FacturaScripts\Core\Mode...se\BusinessDocumentLine was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 22 | use FacturaScripts\Core\Model\Base\SalesDocument; |
||
|
0 ignored issues
–
show
The type
FacturaScripts\Core\Model\Base\SalesDocument was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 23 | use FacturaScripts\Core\Model\Base\SalesDocumentLine; |
||
|
0 ignored issues
–
show
The type
FacturaScripts\Core\Model\Base\SalesDocumentLine was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 24 | use FacturaScripts\Core\Tools; |
||
| 25 | |||
| 26 | use FacturaScripts\Core\Contract\CalculatorModInterface; |
||
|
0 ignored issues
–
show
The type
FacturaScripts\Core\Cont...\CalculatorModInterface was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 27 | |||
| 28 | class CalculatorMod implements CalculatorModInterface |
||
| 29 | { |
||
| 30 | |||
| 31 | public function apply(BusinessDocument &$doc, array &$lines): bool |
||
| 32 | { |
||
| 33 | //TODO: Implement apply() method. |
||
| 34 | return true; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function calculate(BusinessDocument &$doc, array &$lines): bool |
||
| 38 | { |
||
| 39 | // calculamos el total de impuestos |
||
| 40 | // $totalTaxes = 0.0; |
||
| 41 | // foreach ($lines as $line) { |
||
| 42 | // $totalTaxes += (($line->iva + $line->rdtaxisc + $line->rdtaxcdt) * $line->pvptotal) / 100.0; |
||
| 43 | // } |
||
| 44 | // $doc->totaliva = round($totalTaxes, FS_NF0); |
||
| 45 | // $doc->total = $doc->neto + $doc->totaliva; |
||
| 46 | return true; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function calculateLine(BusinessDocument $doc, BusinessDocumentLine &$line): bool |
||
| 50 | { |
||
| 51 | // TODO: Implement calculateLine() method. |
||
| 52 | return true; |
||
| 53 | } |
||
| 54 | |||
| 55 | public function clear(BusinessDocument &$doc, array &$lines): bool |
||
| 56 | { |
||
| 57 | // TODO: Implement clear() method. |
||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 61 | public function getSubtotals(array &$subtotals, BusinessDocument $doc, array $lines): bool |
||
| 62 | { |
||
| 63 | // TODO: Implement getSubtotals() method. |
||
| 64 | return true; |
||
| 65 | } |
||
| 66 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths