-
Notifications
You must be signed in to change notification settings - Fork 81
Description
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();
}`