Bug 13601: get rid of DateTime::Format::DateParse
[koha.git] / C4 / Patroncards / Lib.pm
index b0061ae..9d1d3ed 100644 (file)
@@ -13,9 +13,9 @@ package C4::Patroncards::Lib;
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
 use warnings;
@@ -26,16 +26,16 @@ use C4::Context;
 use C4::Debug;
 
 BEGIN {
-    use version; our $VERSION = qv('1.0.0_1');
+    use version; our $VERSION = qv('3.07.00.049');
     use base qw(Exporter);
-    our @EXPORT_OK = qw(unpack_UTF8
-                        text_alignment
-                        leading
-                        box
-                        get_borrower_attributes
-                        put_image
-                        get_image
-                        rm_image
+    our @EXPORT = qw(unpack_UTF8
+                     text_alignment
+                     leading
+                     box
+                     get_borrower_attributes
+                     put_image
+                     get_image
+                     rm_image
     );
 }
 
@@ -58,12 +58,12 @@ sub text_alignment {
         return $origin_llx, $Tw;
     }
     elsif ($alignment eq 'C') {
-        my $center_margin = ($text_box_width / 2) +  $text_llx;
+        my $center_margin = ($text_box_width / 2) + ($origin_llx - $text_llx);
         $Tx = $center_margin - ($string_width / 2);
         return $Tx, $Tw;
     }
     elsif ($alignment eq 'R') {
-        $Tx = ($text_box_width - $string_width) + ($text_llx / 2);
+        $Tx = ($text_box_width - $string_width) + (($origin_llx - $text_llx) / 2);
         return $Tx, $Tw;
     }
     elsif ($alignment eq 'L') {