Postel-ITA is a library to create files compatible with the Italian Poste Postel system.
To install the library, use the following command:
pnpm install postel-ita
Here is an example of how to use the library:
import { Postel, Currency, Payment } from 'postel-ita';
const postel = new Postel();
const headerParams = {
// ...header parameters...
};
const paymentParams = {
// ...payment parameters...
};
postel.header.init(headerParams);
const payment = new Payment(paymentParams);
postel.payments.push(payment);
const mBody = postel.payments[0].missive.body;
mBody
.addRow(10, 'abs')
.appendText('€' + paymentParams.comm.amount.toPostelString())
.setMaxWidth(21)
.setAlignRight(36);
// ...additional code...
console.log(postel.result());
See the CHANGELOG for details on changes and updates.
This project is licensed under the ISC License - see the LICENSE file for details.