import React from 'react'; // import logo from "../../images/payprelogo1.svg" import logo from '../../Images/pozologoimg.png'; import { PhoneOutlined, MailOutlined, EnvironmentOutlined, } from '@ant-design/icons'; import moment from 'moment'; import './Pdfdoc.scss'; const PdfPage = ({ printingdata, CompanyName, zipcode, address, City }) => { var start = moment(printingdata?.ValidityStart); var end = moment(printingdata?.ValidityEnd); let DayCount = end.diff(start, 'days') > 30 ? 'Yearly' : 'Monthly'; const formatDateToDMY = (originalDate) => { // Step 1: Parse the original date string into a JavaScript Date object let dateObject = new Date(originalDate); // Step 2: Create a new date string in the "date month year" format let day = String(dateObject.getDate()).padStart(2, '0'); let month = String(dateObject.getMonth() + 1).padStart(2, '0'); // Months are zero-based let year = dateObject.getFullYear(); let formattedDate = `${day}/${month}/${year}`; return formattedDate; }; return ( <>

Invoice

PayPre Private Limited

Invoice Number : {printingdata ? printingdata?.UniqueId : null}

Amount: ₹ {printingdata ? printingdata?.NetPrice : 0}

Payment Method : {printingdata ? printingdata.PaymentModeName : null}

Date : {printingdata ? formatDateToDMY(printingdata.PurDate) : null}

Billed From

Paypre , 51, Step colony, Dharga, Hosur - 635 126, Tamilnadu, India.

Phone : +91 9344644484, 9445222716

Billed To

{printingdata ? printingdata.UserName != null ? printingdata.UserName : printingdata.MobileNo : 'hh'} ,

{CompanyName != null ? CompanyName : null}

{address != null ? address : null} {City != null ? City : null}{' '} {zipcode != null ? zipcode : null}

Phone : {printingdata ? printingdata.MobileNo : null}


Statement Summary
Description Plan Type Duration Purchase Date Period Amount
{printingdata ? printingdata.AppName : null} {printingdata ? printingdata?.PricingName : 0} {DayCount} {printingdata ? formatDateToDMY(printingdata.PurDate) : null} {printingdata ? formatDateToDMY(printingdata.ValidityStart) : null}{' '} -{' '} {printingdata ? formatDateToDMY(printingdata.ValidityEnd) : null} ₹{printingdata ? printingdata.NetPrice : 0}

Sub Total ₹{printingdata ? printingdata.Price : 0}
Tax ₹{printingdata ? printingdata.TaxAmount : 0}
Total ₹{printingdata ? printingdata.NetPrice : 0}

Terms & Conditions

These Buying Terms and Conditions (the "Agreement") set forth the terms and conditions governing the purchase of goods or services (collectively referred to as "Products") from a seller or vendor (referred to as the "Seller") by a buyer (referred to as the "Buyer"). By placing an order for Products, the Buyer agrees to be bound by this Agreement.

{' '}   87569876216

{' '}   pozo@info.com

{' '}   Hosur-Tamilnadu, India.{' '}


); }; export default PdfPage;