コード例 #1
0
 private function checkImportes($id, $neto, $bruto, $iva, $total, $bonificacion)
 {
     if ($bruto - $bruto * ($bonificacion / 10) != $neto + $iva) {
         return false;
     } else {
         $ctacte = Ctacte::where('id', '=', $id)->get();
         $lineas = $ctacte->lineas_factura();
         $total_lineas = 0;
         foreach ($lineas as $lin) {
             $total_lineas += $lin->importe;
         }
         return $neto == $total_lineas;
     }
 }