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

createDraftInvoice ile fatura oluşturamıyorum #4

Closed
mzuvin opened this issue Mar 25, 2020 · 2 comments
Closed

createDraftInvoice ile fatura oluşturamıyorum #4

mzuvin opened this issue Mar 25, 2020 · 2 comments

Comments

@mzuvin
Copy link
Contributor

mzuvin commented Mar 25, 2020

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"})
	}
}));

image

{
   "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"}}}

@mzuvin mzuvin closed this as completed Jun 1, 2020
@berkslv
Copy link

berkslv commented Feb 22, 2021

@mzuvin Sorun çözüldümü? bende aynı hatayı alıyorum

@mzuvin
Copy link
Contributor Author

mzuvin commented Feb 22, 2021

@berkslv sitedeki formlar değişiyor, dev console dan bakıp düzeltmiştim ben. yine değişmiştir form elemanlari.

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

2 participants