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

TransactionMapper contains hardcoded EUR currencies #176

Open
ingmarcur opened this issue Apr 2, 2020 · 0 comments
Open

TransactionMapper contains hardcoded EUR currencies #176

ingmarcur opened this issue Apr 2, 2020 · 0 comments

Comments

@ingmarcur
Copy link

Hi,

The function map in TransactionMapper contains hardcoded EUR currencies:
149 ->setValue(Money::EUR(100 * self::getField($transaction, $lineElement, 'value')))
151,153,163,168.

Which result in a: "InvalidArgumentException: Currencies must be identical in.." exception.

`$t = new CashTransaction();
$t->setOffice($office);
$t->setCode('KAS');
$t->setDestiny(Enums\Destiny::TEMPORARY());
$t->setDate(new DateTime());
$t->setCurrency(new Currency('ANG'));
$t->setStartvalue(Money::ANG(0));

$l1 = new CashTransactionLine();
$l1->setId(1);
$l1->setLineType(Enums\LineType::DETAIL());
$l1->setDim1(8001);
$l1->setValue(Money::ANG(289));
$l1->setDescription("Some description...");
$t->setLines(array($l1));

try{
$ret = $tFactory->send($t);
}catch(Exception $e){
echo $e->getMessage();
}`

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

1 participant