createDraftInvoice ile fatura oluşturamıyorum
mzuvin opened this issue · comments
Mustafa Zuvin commented
express js ile kendime api oluşturdum. fatura oluşturmada hata alıyorum. Nerede hata yapıyorum?
app.post('/faturalar/create', asyncHandler(async (req, res, next) => {
if ('token' in req.headers){
const invoices = await createDraftInvoice(req.headers.token,req.body);
res.json({'message':invoices});
}
else{
res.json({message: "token required headers"})
}
}));
{
"date":"25/03/2020",
"time":"09:07:48",
"taxIDOrTRID":"11111111111",
"taxOffice":"Beylikduzu",
"title":"FATIH AKIN",
"name":"Fatih",
"surname":"Akın",
"contry":"Türkiye",
"district":"Hürriyet",
"city":"İstanbul",
"fullAddress":"X Sok. Y Cad. No: 3 Z Istanbul",
"items":[
{
"name":"Stickker",
"quantity":1,
"unitPrice":100,
"price":100,
"VATRate":18,
"VATAmount":18
}
],
"totalVAT":18,
"grandTotal":100.0,
"grandTotalInclVAT":118.0,
"paymentTotal":118.0
}
{"message":{"date":"25/03/2020","uuid":"e6b4f8e0-6e8f-11ea-a70b-0d71135da38f","data":"Teknik bir hata oluştu.","metadata":{"optime":"20200325145812+0300"}}}
Berk Selvi commented
@mzuvin Sorun çözüldümü? bende aynı hatayı alıyorum
Mustafa Zuvin commented
@berkslv sitedeki formlar değişiyor, dev console dan bakıp düzeltmiştim ben. yine değişmiştir form elemanlari.