Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puedes explicar como se funciona? #1

Open
parijke opened this issue Jun 14, 2021 · 1 comment
Open

Puedes explicar como se funciona? #1

parijke opened this issue Jun 14, 2021 · 1 comment

Comments

@parijke
Copy link

parijke commented Jun 14, 2021

Buenas,

Yo necesito leer un ficha de c43. Como puedo con este proyecto?

Muchas gracias

@javiermarinros
Copy link
Contributor

javiermarinros commented Jun 15, 2021

Hola,

Esto es un ejemplo de como se puede utilizar:

<?php

$file = new Banks_N43();
$file->parse($content);

$entries = [];

foreach ($file->accounts as $account) {
    foreach ($account->entries as $entry) {
        $entries[] = [
            'date'     => $entry->date,
            'name'     => trim("{$entry->refererence_1} {$entry->refererence_2}"),
            'amount'   => $entry->type == Banks_N43::TYPE_DEBIT ? (-1 * $entry->amount) : $entry->amount,
            'subjects' => array_filter(array_filter($entry->concepts,'trim'))
        ];
    }
}

var_dump($entries);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants