# Link writeoff to charge
$writeoff->apply(
{
debits => [$line],
debits => [$line]
offset_type => 'WRITEOFF'
}
);
$writeoff->status('APPLIED')->store();
-