diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php
index ebe6fb90d..8c8f97f86 100644
--- a/views/bootstrap/class.MyDocuments.php
+++ b/views/bootstrap/class.MyDocuments.php
@@ -326,6 +326,118 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
$this->contentContainerEnd();
}
+
+ $receiptStatus = $user->getReceiptStatus();
+ $resArr = $dms->getDocumentList('ReceiptByMe', $user);
+ if (is_bool($resArr) && !$resArr) {
+ $this->contentHeading(getMLText("warning"));
+ $this->contentContainer(getMLText("internal_error_exit"));
+ $this->htmlEndPage();
+ exit;
+ }
+ if($resArr) {
+ /* Create an array to hold all of these results, and index the array
+ * by document id. This makes it easier to retrieve document ID
+ * information later on and saves us having to repeatedly poll the
+ * database every time
+ * new document information is required.
+ */
+ $docIdx = array();
+ foreach ($resArr as $res) {
+
+ /* verify expiry */
+ if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){
+ $res["status"]=S_EXPIRED;
+ }
+
+ $docIdx[$res["id"]][$res["version"]] = $res;
+ }
+ $this->contentHeading(getMLText("documents_to_receipt"));
+ $this->contentContainerStart();
+ $printheader=true;
+ $iRev = array();
+ $dList = array();
+ foreach ($receiptStatus["indstatus"] as $st) {
+
+ if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) {
+ $dList[] = $st["documentID"];
+ $document = $dms->getDocument($st["documentID"]);
+
+ if ($printheader){
+ print "