MT#5879 Allow to skip empty invoices generation with option no_empty.

(cherry picked from commit ae8515d6024df6ac01140a1fd15f209fbcdab33c)
(cherry picked from commit a36a835749be78cafefb4f8a408b98ec6b0565f4)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit 9de94121ca4d38e7fb8125f0c0cc750cae92b42b)
MT#5879 Remove Country processing warning.

(cherry picked from commit 9d80cba5fd51314bd4909505fc09ce05aa232080)
(cherry picked from commit 78a6d8dd96649f969bd9342e418e6c18ef0ce4ff)

Conflicts:
	lib/NGCP/Panel/Utils/Invoice.pm

(cherry picked from commit fd8a48c91432202192d7c5aec57202eab9686917)
MT#5879 Fix generation for ampersands;

(cherry picked from commit 00c430608881b96d937fa598ae028b5e72586d4a)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit d9d85a5db029c59fe578249da5461d5b8d03fd62)
(cherry picked from commit f5651ca84d09f67f4d64aa8bb7a68ee0bcbfdb98)
MT#5879 Not all characters should be quoted

(cherry picked from commit 1a1362db7e0685864cbe33b1f60c46a70c7f15b2)
(cherry picked from commit f7e65e242384c157e1f010115e9071694c868ebc)
(cherry picked from commit 28dc03771127567552fe3d7dd9855610a34f43d7)
MT#8401 Add missed library for invoice data sanitize as XML.

(cherry picked from commit 068e71acfa0124fa180d80e646180db48f827df9)
(cherry picked from commit d5f612209a74cb7ddc1532976a1f1e51c117732a)
MT#8401 Use common invoice data preprocessing for generation script.

(cherry picked from commit f2e983db25221c7926f22305448941c61e7e0ee6)
(cherry picked from commit eb96bc0923ab867b7f757c1879ba7284898d0946)
MT#8433 Process unrated calls.

(cherry picked from commit 8174c1fea632c8b5c8ee0853708e1f6891b74aec)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit a4aaee9a853249427d5d5c1d693c46a43d806bc1)
MT#8433 Remove debug

(cherry picked from commit fda891a70c7dda9f04fe1a888106f8b85aba8375)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit 14717932d4eb4ec73a155bce03a54304b057e358)
MT#8433 Fix of option ttreatment in newest version.

(cherry picked from commit ee3e73d7e159b1d49c066485334848096bd57448)
(cherry picked from commit a2a16d656b3b899d2e41ccfe8364c0a89b990a8e)
MT#5879 Fix billing_mapping logic, use the latest one as actual.

(cherry picked from commit b90be26a2e6fad716c131640db2fd03c040084af)
(cherry picked from commit 54b7f0cac61af9eb313b430fab0ab908cd8b0061)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit e29b836328b8d0bc390650e7a6763d959bf8901c)
MT#5879 Fix memory issue

Don't save or fetch data for all generated/sent invoices.
Fetch data one-by-one.

(cherry picked from commit a393853e65380ab2d5cf8c4a746ffb430e2652f7)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit 6eac00e76593d873016dc0259ee42c109172cb24)
MT#5879 Fix UTF-8 email send. Further fix of memory usage issue.

(cherry picked from commit 0610d530113fc23e229f36b3be847a409cf8bc04)
(cherry picked from commit 6bcca230fc5911e2a35dfb95367036b98e0e4fc9)

Conflicts:
	share/tools/generate_invoices.pl

(cherry picked from commit 0b8b85fa0bcac964e67787bb0ad56a3ba4eb4d68)
MT#8387 Fix incorrect rounding for cents.

(cherry picked from commit e00f0182694dc7b3ab01127805e40cb715c1f7ae)
(cherry picked from commit 935caa8ce08ec063049138253a5acc49f276391d)